forked from rosebudai/OpenRCT2-Web
Pass paint_session as reference
This commit is contained in:
1 parent
2cf62abf85
commit
25cb49f8ce
117 files changed
+30412
-32161
No files matched your search
@@ -2464,7 +2464,7 @@ static void Sub6CbcE2(
|
||||
_tempTrackTileElement.AsTrack()->SetRideIndex(rideIndex);
|
||||
|
||||
// Draw this map tile
|
||||
tile_element_paint_setup(session, coords, true);
|
||||
tile_element_paint_setup(*session, coords, true);
|
||||
|
||||
// Restore map elements
|
||||
map_set_tile_element(centreTileCoords, _backupTileElementArrays[0]);
|
||||
@@ -2478,8 +2478,8 @@ static void Sub6CbcE2(
|
||||
|
||||
gMapSize = preserveMapSize;
|
||||
|
||||
PaintSessionArrange(session);
|
||||
PaintDrawStructs(session);
|
||||
PaintSessionArrange(*session);
|
||||
PaintDrawStructs(*session);
|
||||
PaintSessionFree(session);
|
||||
}
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ static void BM_paint_session_arrange(benchmark::State& state, const std::vector<
|
||||
state.PauseTiming();
|
||||
std::copy_n(local_s, std::size(sessions), sessions.begin());
|
||||
state.ResumeTiming();
|
||||
PaintSessionArrange(&sessions[0].Session);
|
||||
PaintSessionArrange(sessions[0].Session);
|
||||
benchmark::DoNotOptimize(sessions);
|
||||
}
|
||||
state.SetItemsProcessed(state.iterations() * std::size(sessions));
|
||||
|
||||
@@ -576,7 +576,7 @@ void scrolling_text_invalidate();
|
||||
class Formatter;
|
||||
|
||||
int32_t scrolling_text_setup(
|
||||
struct paint_session* session, rct_string_id stringId, Formatter& ft, uint16_t scroll, uint16_t scrollingMode,
|
||||
struct paint_session& session, rct_string_id stringId, Formatter& ft, uint16_t scroll, uint16_t scrollingMode,
|
||||
colour_t colour);
|
||||
|
||||
rct_size16 FASTCALL gfx_get_sprite_size(uint32_t image_id);
|
||||
|
||||
@@ -309,8 +309,8 @@ void lightfx_prepare_light_list()
|
||||
dpi.width = 1;
|
||||
|
||||
paint_session* session = PaintSessionAlloc(&dpi, w->viewport->flags);
|
||||
PaintSessionGenerate(session);
|
||||
PaintSessionArrange(session);
|
||||
PaintSessionGenerate(*session);
|
||||
PaintSessionArrange(*session);
|
||||
auto info = set_interaction_info_from_paint_session(session, ViewportInteractionItemAll);
|
||||
PaintSessionFree(session);
|
||||
|
||||
|
||||
@@ -1446,13 +1446,13 @@ void scrolling_text_invalidate()
|
||||
}
|
||||
|
||||
int32_t scrolling_text_setup(
|
||||
paint_session* session, rct_string_id stringId, Formatter& ft, uint16_t scroll, uint16_t scrollingMode, colour_t colour)
|
||||
paint_session& session, rct_string_id stringId, Formatter& ft, uint16_t scroll, uint16_t scrollingMode, colour_t colour)
|
||||
{
|
||||
std::scoped_lock<std::mutex> lock(_scrollingTextMutex);
|
||||
|
||||
assert(scrollingMode < MAX_SCROLLING_TEXT_MODES);
|
||||
|
||||
rct_drawpixelinfo* dpi = &session->DPI;
|
||||
rct_drawpixelinfo* dpi = &session.DPI;
|
||||
|
||||
if (dpi->zoom_level > ZoomLevel{ 0 })
|
||||
return SPR_SCROLLING_TEXT_DEFAULT;
|
||||
|
||||
@@ -108,7 +108,7 @@ void Balloon::Serialise(DataSerialiser& stream)
|
||||
stream << colour;
|
||||
}
|
||||
|
||||
void Balloon::Paint(paint_session* session, int32_t imageDirection) const
|
||||
void Balloon::Paint(paint_session& session, int32_t imageDirection) const
|
||||
{
|
||||
uint32_t imageId = 22651 + (frame & 7);
|
||||
if (popped != 0)
|
||||
|
||||
@@ -27,5 +27,5 @@ struct Balloon : EntityBase
|
||||
void Pop();
|
||||
void Press();
|
||||
void Serialise(DataSerialiser& stream);
|
||||
void Paint(paint_session* session, int32_t imageDirection) const;
|
||||
void Paint(paint_session& session, int32_t imageDirection) const;
|
||||
};
|
||||
@@ -364,9 +364,9 @@ void Duck::Serialise(DataSerialiser& stream)
|
||||
stream << state;
|
||||
}
|
||||
|
||||
void Duck::Paint(paint_session* session, int32_t imageDirection) const
|
||||
void Duck::Paint(paint_session& session, int32_t imageDirection) const
|
||||
{
|
||||
rct_drawpixelinfo& dpi = session->DPI;
|
||||
rct_drawpixelinfo& dpi = session.DPI;
|
||||
if (dpi.zoom_level > ZoomLevel{ 1 })
|
||||
return;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ struct Duck : EntityBase
|
||||
bool IsFlying();
|
||||
void Remove();
|
||||
void Serialise(DataSerialiser& stream);
|
||||
void Paint(paint_session* session, int32_t imageDirection) const;
|
||||
void Paint(paint_session& session, int32_t imageDirection) const;
|
||||
|
||||
private:
|
||||
void UpdateFlyToWater();
|
||||
|
||||
@@ -394,13 +394,13 @@ void JumpingFountain::Serialise(DataSerialiser& stream)
|
||||
stream << Iteration;
|
||||
}
|
||||
|
||||
void JumpingFountain::Paint(paint_session* session, int32_t imageDirection) const
|
||||
void JumpingFountain::Paint(paint_session& session, int32_t imageDirection) const
|
||||
{
|
||||
// TODO: Move into sprites.h
|
||||
constexpr uint32_t JumpingFountainSnowBaseImage = 23037;
|
||||
constexpr uint32_t JumpingFountainWaterBaseImage = 22973;
|
||||
|
||||
rct_drawpixelinfo& dpi = session->DPI;
|
||||
rct_drawpixelinfo& dpi = session.DPI;
|
||||
if (dpi.zoom_level > ZoomLevel{ 0 })
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -35,7 +35,7 @@ struct JumpingFountain : EntityBase
|
||||
void Update();
|
||||
static void StartAnimation(JumpingFountainType newType, const CoordsXY& newLoc, const TileElement* tileElement);
|
||||
void Serialise(DataSerialiser& stream);
|
||||
void Paint(paint_session* session, int32_t imageDirection) const;
|
||||
void Paint(paint_session& session, int32_t imageDirection) const;
|
||||
|
||||
private:
|
||||
JumpingFountainType GetType() const;
|
||||
|
||||
@@ -169,9 +169,9 @@ static constexpr const LitterSprite _litterSprites[] = {
|
||||
{ SPR_LITTER_EMPTY_BOWL_BLUE, 0x3 },
|
||||
};
|
||||
|
||||
void Litter::Paint(paint_session* session, int32_t imageDirection) const
|
||||
void Litter::Paint(paint_session& session, int32_t imageDirection) const
|
||||
{
|
||||
rct_drawpixelinfo& dpi = session->DPI;
|
||||
rct_drawpixelinfo& dpi = session.DPI;
|
||||
if (dpi.zoom_level > ZoomLevel{ 0 })
|
||||
return; // If zoomed at all no litter drawn
|
||||
|
||||
|
||||
@@ -42,5 +42,5 @@ struct Litter : EntityBase
|
||||
void Serialise(DataSerialiser& stream);
|
||||
rct_string_id GetName() const;
|
||||
uint32_t GetAge() const;
|
||||
void Paint(paint_session* session, int32_t imageDirection) const;
|
||||
void Paint(paint_session& session, int32_t imageDirection) const;
|
||||
};
|
||||
@@ -166,9 +166,9 @@ void MoneyEffect::Serialise(DataSerialiser& stream)
|
||||
stream << Wiggle;
|
||||
}
|
||||
|
||||
void MoneyEffect::Paint(paint_session* session, int32_t imageDirection) const
|
||||
void MoneyEffect::Paint(paint_session& session, int32_t imageDirection) const
|
||||
{
|
||||
rct_drawpixelinfo& dpi = session->DPI;
|
||||
rct_drawpixelinfo& dpi = session.DPI;
|
||||
if (dpi.zoom_level > ZoomLevel{ 0 })
|
||||
{
|
||||
return;
|
||||
@@ -182,5 +182,5 @@ void MoneyEffect::Paint(paint_session* session, int32_t imageDirection) const
|
||||
|
||||
auto [stringId, value] = GetStringId();
|
||||
PaintFloatingMoneyEffect(
|
||||
session, value, stringId, y, z, const_cast<int8_t*>(&waveOffset[Wiggle % 22]), OffsetX, session->CurrentRotation);
|
||||
session, value, stringId, y, z, const_cast<int8_t*>(&waveOffset[Wiggle % 22]), OffsetX, session.CurrentRotation);
|
||||
}
|
||||
@@ -32,5 +32,5 @@ struct MoneyEffect : EntityBase
|
||||
void Update();
|
||||
std::pair<rct_string_id, money64> GetStringId() const;
|
||||
void Serialise(DataSerialiser& stream);
|
||||
void Paint(paint_session* session, int32_t imageDirection) const;
|
||||
void Paint(paint_session& session, int32_t imageDirection) const;
|
||||
};
|
||||
@@ -149,9 +149,9 @@ void VehicleCrashParticle::Serialise(DataSerialiser& stream)
|
||||
stream << acceleration_z;
|
||||
}
|
||||
|
||||
void VehicleCrashParticle::Paint(paint_session* session, int32_t imageDirection) const
|
||||
void VehicleCrashParticle::Paint(paint_session& session, int32_t imageDirection) const
|
||||
{
|
||||
rct_drawpixelinfo& dpi = session->DPI;
|
||||
rct_drawpixelinfo& dpi = session.DPI;
|
||||
if (dpi.zoom_level > ZoomLevel{ 0 })
|
||||
{
|
||||
return;
|
||||
@@ -199,7 +199,7 @@ void CrashSplashParticle::Serialise(DataSerialiser& stream)
|
||||
stream << frame;
|
||||
}
|
||||
|
||||
void CrashSplashParticle::Paint(paint_session* session, int32_t imageDirection) const
|
||||
void CrashSplashParticle::Paint(paint_session& session, int32_t imageDirection) const
|
||||
{
|
||||
// TODO: Create constant in sprites.h
|
||||
uint32_t imageId = 22927 + (frame / 256);
|
||||
@@ -256,7 +256,7 @@ void SteamParticle::Serialise(DataSerialiser& stream)
|
||||
stream << time_to_move;
|
||||
}
|
||||
|
||||
void SteamParticle::Paint(paint_session* session, int32_t imageDirection) const
|
||||
void SteamParticle::Paint(paint_session& session, int32_t imageDirection) const
|
||||
{
|
||||
// TODO: Create constant in sprites.h
|
||||
uint32_t imageId = 22637 + (frame / 256);
|
||||
@@ -300,7 +300,7 @@ void ExplosionCloud::Serialise(DataSerialiser& stream)
|
||||
stream << frame;
|
||||
}
|
||||
|
||||
void ExplosionCloud::Paint(paint_session* session, int32_t imageDirection) const
|
||||
void ExplosionCloud::Paint(paint_session& session, int32_t imageDirection) const
|
||||
{
|
||||
uint32_t imageId = 22878 + (frame / 256);
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, z }, { 1, 1, 0 });
|
||||
@@ -343,7 +343,7 @@ void ExplosionFlare::Serialise(DataSerialiser& stream)
|
||||
stream << frame;
|
||||
}
|
||||
|
||||
void ExplosionFlare::Paint(paint_session* session, int32_t imageDirection) const
|
||||
void ExplosionFlare::Paint(paint_session& session, int32_t imageDirection) const
|
||||
{
|
||||
// TODO: Create constant in sprites.h
|
||||
uint32_t imageId = 22896 + (frame / 256);
|
||||
|
||||
@@ -32,7 +32,7 @@ struct VehicleCrashParticle : EntityBase
|
||||
static void Create(rct_vehicle_colour colours, const CoordsXYZ& vehiclePos);
|
||||
void Update();
|
||||
void Serialise(DataSerialiser& stream);
|
||||
void Paint(paint_session* session, int32_t imageDirection) const;
|
||||
void Paint(paint_session& session, int32_t imageDirection) const;
|
||||
};
|
||||
|
||||
struct CrashSplashParticle : EntityBase
|
||||
@@ -42,7 +42,7 @@ struct CrashSplashParticle : EntityBase
|
||||
static void Create(const CoordsXYZ& splashPos);
|
||||
void Update();
|
||||
void Serialise(DataSerialiser& stream);
|
||||
void Paint(paint_session* session, int32_t imageDirection) const;
|
||||
void Paint(paint_session& session, int32_t imageDirection) const;
|
||||
};
|
||||
|
||||
struct ExplosionFlare : EntityBase
|
||||
@@ -52,7 +52,7 @@ struct ExplosionFlare : EntityBase
|
||||
static void Create(const CoordsXYZ& flarePos);
|
||||
void Update();
|
||||
void Serialise(DataSerialiser& stream);
|
||||
void Paint(paint_session* session, int32_t imageDirection) const;
|
||||
void Paint(paint_session& session, int32_t imageDirection) const;
|
||||
};
|
||||
|
||||
struct ExplosionCloud : EntityBase
|
||||
@@ -62,7 +62,7 @@ struct ExplosionCloud : EntityBase
|
||||
static void Create(const CoordsXYZ& cloudPos);
|
||||
void Update();
|
||||
void Serialise(DataSerialiser& stream);
|
||||
void Paint(paint_session* session, int32_t imageDirection) const;
|
||||
void Paint(paint_session& session, int32_t imageDirection) const;
|
||||
};
|
||||
|
||||
struct SteamParticle : EntityBase
|
||||
@@ -74,5 +74,5 @@ struct SteamParticle : EntityBase
|
||||
static void Create(const CoordsXYZ& coords);
|
||||
void Update();
|
||||
void Serialise(DataSerialiser& stream);
|
||||
void Paint(paint_session* session, int32_t imageDirection) const;
|
||||
void Paint(paint_session& session, int32_t imageDirection) const;
|
||||
};
|
||||
@@ -2678,7 +2678,7 @@ void Peep::Serialise(DataSerialiser& stream)
|
||||
stream << PeepFlags;
|
||||
}
|
||||
|
||||
void Peep::Paint(paint_session* session, int32_t imageDirection) const
|
||||
void Peep::Paint(paint_session& session, int32_t imageDirection) const
|
||||
{
|
||||
#ifdef __ENABLE_LIGHTFX__
|
||||
if (lightfx_is_available())
|
||||
@@ -2709,13 +2709,13 @@ void Peep::Paint(paint_session* session, int32_t imageDirection) const
|
||||
}
|
||||
#endif
|
||||
|
||||
rct_drawpixelinfo* dpi = &session->DPI;
|
||||
rct_drawpixelinfo* dpi = &session.DPI;
|
||||
if (dpi->zoom_level > ZoomLevel{ 2 })
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_INVISIBLE_PEEPS)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_INVISIBLE_PEEPS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@ public: // Peep
|
||||
[[nodiscard]] CoordsXY GetDestination() const;
|
||||
|
||||
void Serialise(class DataSerialiser& stream);
|
||||
void Paint(paint_session* session, int32_t imageDirection) const;
|
||||
void Paint(paint_session& session, int32_t imageDirection) const;
|
||||
|
||||
// TODO: Make these private again when done refactoring
|
||||
public: // Peep
|
||||
|
||||
@@ -834,22 +834,22 @@ void viewport_render(
|
||||
}
|
||||
|
||||
static void record_session(
|
||||
const paint_session* session, std::vector<RecordedPaintSession>* recorded_sessions, size_t record_index)
|
||||
const paint_session& session, std::vector<RecordedPaintSession>* recorded_sessions, size_t record_index)
|
||||
{
|
||||
// Perform a deep copy of the paint session, use relative offsets.
|
||||
// This is done to extract the session for benchmark.
|
||||
// Place the copied session at provided record_index, so the caller can decide which columns/paint sessions to copy;
|
||||
// there is no column information embedded in the session itself.
|
||||
auto& recordedSession = recorded_sessions->at(record_index);
|
||||
recordedSession.Session = *session;
|
||||
recordedSession.Entries.resize(session->PaintEntryChain.GetCount());
|
||||
recordedSession.Session = session;
|
||||
recordedSession.Entries.resize(session.PaintEntryChain.GetCount());
|
||||
|
||||
// Mind the offset needs to be calculated against the original `session`, not `session_copy`
|
||||
std::unordered_map<paint_struct*, paint_struct*> entryRemap;
|
||||
|
||||
// Copy all entries
|
||||
auto paintIndex = 0;
|
||||
auto chain = session->PaintEntryChain.Head;
|
||||
auto chain = session.PaintEntryChain.Head;
|
||||
while (chain != nullptr)
|
||||
{
|
||||
for (size_t i = 0; i < chain->Count; i++)
|
||||
@@ -894,7 +894,7 @@ static void record_session(
|
||||
}
|
||||
|
||||
static void viewport_fill_column(
|
||||
paint_session* session, std::vector<RecordedPaintSession>* recorded_sessions, size_t record_index)
|
||||
paint_session& session, std::vector<RecordedPaintSession>* recorded_sessions, size_t record_index)
|
||||
{
|
||||
PaintSessionGenerate(session);
|
||||
if (recorded_sessions != nullptr)
|
||||
@@ -904,32 +904,32 @@ static void viewport_fill_column(
|
||||
PaintSessionArrange(session);
|
||||
}
|
||||
|
||||
static void viewport_paint_column(paint_session* session)
|
||||
static void viewport_paint_column(paint_session& session)
|
||||
{
|
||||
if (session->ViewFlags
|
||||
if (session.ViewFlags
|
||||
& (VIEWPORT_FLAG_HIDE_VERTICAL | VIEWPORT_FLAG_HIDE_BASE | VIEWPORT_FLAG_UNDERGROUND_INSIDE
|
||||
| VIEWPORT_FLAG_CLIP_VIEW)
|
||||
&& (~session->ViewFlags & VIEWPORT_FLAG_TRANSPARENT_BACKGROUND))
|
||||
&& (~session.ViewFlags & VIEWPORT_FLAG_TRANSPARENT_BACKGROUND))
|
||||
{
|
||||
uint8_t colour = COLOUR_AQUAMARINE;
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES)
|
||||
{
|
||||
colour = COLOUR_BLACK;
|
||||
}
|
||||
gfx_clear(&session->DPI, colour);
|
||||
gfx_clear(&session.DPI, colour);
|
||||
}
|
||||
|
||||
PaintDrawStructs(session);
|
||||
|
||||
if (gConfigGeneral.render_weather_gloom && !gTrackDesignSaveMode && !(session->ViewFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES)
|
||||
&& !(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
if (gConfigGeneral.render_weather_gloom && !gTrackDesignSaveMode && !(session.ViewFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES)
|
||||
&& !(session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
{
|
||||
viewport_paint_weather_gloom(&session->DPI);
|
||||
viewport_paint_weather_gloom(&session.DPI);
|
||||
}
|
||||
|
||||
if (session->PSStringHead != nullptr)
|
||||
if (session.PSStringHead != nullptr)
|
||||
{
|
||||
PaintDrawMoneyStructs(&session->DPI, session->PSStringHead);
|
||||
PaintDrawMoneyStructs(&session.DPI, session.PSStringHead);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1038,11 +1038,11 @@ void viewport_paint(
|
||||
if (useMultithreading)
|
||||
{
|
||||
_paintJobs->AddTask(
|
||||
[session, recorded_sessions, index]() -> void { viewport_fill_column(session, recorded_sessions, index); });
|
||||
[session, recorded_sessions, index]() -> void { viewport_fill_column(*session, recorded_sessions, index); });
|
||||
}
|
||||
else
|
||||
{
|
||||
viewport_fill_column(session, recorded_sessions, index);
|
||||
viewport_fill_column(*session, recorded_sessions, index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1056,11 +1056,11 @@ void viewport_paint(
|
||||
{
|
||||
if (useParallelDrawing)
|
||||
{
|
||||
_paintJobs->AddTask([session]() -> void { viewport_paint_column(session); });
|
||||
_paintJobs->AddTask([session]() -> void { viewport_paint_column(*session); });
|
||||
}
|
||||
else
|
||||
{
|
||||
viewport_paint_column(session);
|
||||
viewport_paint_column(*session);
|
||||
}
|
||||
}
|
||||
if (useParallelDrawing)
|
||||
@@ -1736,8 +1736,8 @@ InteractionInfo get_map_coordinates_from_pos_window(rct_window* window, const Sc
|
||||
dpi.width = 1;
|
||||
|
||||
paint_session* session = PaintSessionAlloc(&dpi, myviewport->flags);
|
||||
PaintSessionGenerate(session);
|
||||
PaintSessionArrange(session);
|
||||
PaintSessionGenerate(*session);
|
||||
PaintSessionArrange(*session);
|
||||
info = set_interaction_info_from_paint_session(session, flags & 0xFFFF);
|
||||
PaintSessionFree(session);
|
||||
}
|
||||
|
||||
@@ -33,24 +33,24 @@
|
||||
* Paint Quadrant
|
||||
* rct2: 0x0069E8B0
|
||||
*/
|
||||
void EntityPaintSetup(paint_session* session, const CoordsXY& pos)
|
||||
void EntityPaintSetup(paint_session& session, const CoordsXY& pos)
|
||||
{
|
||||
if (!map_is_location_valid(pos))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (gTrackDesignSaveMode || (session->ViewFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES))
|
||||
if (gTrackDesignSaveMode || (session.ViewFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
rct_drawpixelinfo* dpi = &session->DPI;
|
||||
rct_drawpixelinfo* dpi = &session.DPI;
|
||||
if (dpi->zoom_level > ZoomLevel{ 2 })
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const bool highlightPathIssues = (session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES);
|
||||
const bool highlightPathIssues = (session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES);
|
||||
|
||||
for (const auto* spr : EntityTileList(pos))
|
||||
{
|
||||
@@ -76,7 +76,7 @@ void EntityPaintSetup(paint_session* session, const CoordsXY& pos)
|
||||
// Here converting from land/path/etc height scale to pixel height scale.
|
||||
// Note: peeps/scenery on slopes will be above the base
|
||||
// height of the slope element, and consequently clipped.
|
||||
if ((session->ViewFlags & VIEWPORT_FLAG_CLIP_VIEW))
|
||||
if ((session.ViewFlags & VIEWPORT_FLAG_CLIP_VIEW))
|
||||
{
|
||||
if (entityPos.z > (gClipHeight * COORDS_Z_STEP))
|
||||
{
|
||||
@@ -92,7 +92,7 @@ void EntityPaintSetup(paint_session* session, const CoordsXY& pos)
|
||||
}
|
||||
}
|
||||
|
||||
dpi = &session->DPI;
|
||||
dpi = &session.DPI;
|
||||
|
||||
if (dpi->y + dpi->height <= spr->SpriteRect.GetTop() || spr->SpriteRect.GetBottom() <= dpi->y
|
||||
|| dpi->x + dpi->width <= spr->SpriteRect.GetLeft() || spr->SpriteRect.GetRight() <= dpi->x)
|
||||
@@ -100,15 +100,15 @@ void EntityPaintSetup(paint_session* session, const CoordsXY& pos)
|
||||
continue;
|
||||
}
|
||||
|
||||
int32_t image_direction = session->CurrentRotation;
|
||||
int32_t image_direction = session.CurrentRotation;
|
||||
image_direction <<= 3;
|
||||
image_direction += spr->sprite_direction;
|
||||
image_direction &= 0x1F;
|
||||
|
||||
session->CurrentlyDrawnItem = spr;
|
||||
session->SpritePosition.x = entityPos.x;
|
||||
session->SpritePosition.y = entityPos.y;
|
||||
session->InteractionType = ViewportInteractionItem::Entity;
|
||||
session.CurrentlyDrawnItem = spr;
|
||||
session.SpritePosition.x = entityPos.x;
|
||||
session.SpritePosition.y = entityPos.y;
|
||||
session.InteractionType = ViewportInteractionItem::Entity;
|
||||
|
||||
switch (spr->Type)
|
||||
{
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
struct paint_session;
|
||||
struct CoordsXY;
|
||||
|
||||
void EntityPaintSetup(paint_session* session, const CoordsXY& pos);
|
||||
void EntityPaintSetup(paint_session& session, const CoordsXY& pos);
|
||||
@@ -83,19 +83,19 @@ static int32_t RemapPositionToQuadrant(const paint_struct& ps, uint8_t rotation)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void PaintSessionAddPSToQuadrant(paint_session* session, paint_struct* ps)
|
||||
static void PaintSessionAddPSToQuadrant(paint_session& session, paint_struct* ps)
|
||||
{
|
||||
const auto positionHash = RemapPositionToQuadrant(*ps, session->CurrentRotation);
|
||||
const auto positionHash = RemapPositionToQuadrant(*ps, session.CurrentRotation);
|
||||
|
||||
// Values below zero or above MaxPaintQuadrants are void, corners also share the same quadrant as void.
|
||||
const uint32_t paintQuadrantIndex = std::clamp(positionHash / COORDS_XY_STEP, 0, MaxPaintQuadrants - 1);
|
||||
|
||||
ps->quadrant_index = paintQuadrantIndex;
|
||||
ps->next_quadrant_ps = session->Quadrants[paintQuadrantIndex];
|
||||
session->Quadrants[paintQuadrantIndex] = ps;
|
||||
ps->next_quadrant_ps = session.Quadrants[paintQuadrantIndex];
|
||||
session.Quadrants[paintQuadrantIndex] = ps;
|
||||
|
||||
session->QuadrantBackIndex = std::min(session->QuadrantBackIndex, paintQuadrantIndex);
|
||||
session->QuadrantFrontIndex = std::max(session->QuadrantFrontIndex, paintQuadrantIndex);
|
||||
session.QuadrantBackIndex = std::min(session.QuadrantBackIndex, paintQuadrantIndex);
|
||||
session.QuadrantFrontIndex = std::max(session.QuadrantFrontIndex, paintQuadrantIndex);
|
||||
}
|
||||
|
||||
static constexpr bool ImageWithinDPI(const ScreenCoordsXY& imagePos, const rct_g1_element& g1, const rct_drawpixelinfo& dpi)
|
||||
@@ -147,7 +147,7 @@ static constexpr CoordsXYZ RotateBoundBoxSize(const CoordsXYZ& bbSize, const uin
|
||||
* Extracted from 0x0098196c, 0x0098197c, 0x0098198c, 0x0098199c
|
||||
*/
|
||||
static paint_struct* CreateNormalPaintStruct(
|
||||
paint_session* session, ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
|
||||
paint_session& session, ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
|
||||
const CoordsXYZ& boundBoxOffset)
|
||||
{
|
||||
auto* const g1 = gfx_get_g1_element(image_id);
|
||||
@@ -156,21 +156,21 @@ static paint_struct* CreateNormalPaintStruct(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const auto swappedRotation = DirectionFlipXAxis(session->CurrentRotation);
|
||||
const auto swappedRotation = DirectionFlipXAxis(session.CurrentRotation);
|
||||
auto swappedRotCoord = CoordsXYZ{ offset.Rotate(swappedRotation), offset.z };
|
||||
swappedRotCoord += session->SpritePosition;
|
||||
swappedRotCoord += session.SpritePosition;
|
||||
|
||||
const auto imagePos = translate_3d_to_2d_with_z(session->CurrentRotation, swappedRotCoord);
|
||||
const auto imagePos = translate_3d_to_2d_with_z(session.CurrentRotation, swappedRotCoord);
|
||||
|
||||
if (!ImageWithinDPI(imagePos, *g1, session->DPI))
|
||||
if (!ImageWithinDPI(imagePos, *g1, session.DPI))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const auto rotBoundBoxOffset = CoordsXYZ{ boundBoxOffset.Rotate(swappedRotation), boundBoxOffset.z };
|
||||
const auto rotBoundBoxSize = RotateBoundBoxSize(boundBoxSize, session->CurrentRotation);
|
||||
const auto rotBoundBoxSize = RotateBoundBoxSize(boundBoxSize, session.CurrentRotation);
|
||||
|
||||
auto* ps = session->AllocateNormalPaintEntry();
|
||||
auto* ps = session.AllocateNormalPaintEntry();
|
||||
if (ps == nullptr)
|
||||
{
|
||||
return nullptr;
|
||||
@@ -179,27 +179,27 @@ static paint_struct* CreateNormalPaintStruct(
|
||||
ps->image_id = image_id;
|
||||
ps->x = imagePos.x;
|
||||
ps->y = imagePos.y;
|
||||
ps->bounds.x_end = rotBoundBoxSize.x + rotBoundBoxOffset.x + session->SpritePosition.x;
|
||||
ps->bounds.y_end = rotBoundBoxSize.y + rotBoundBoxOffset.y + session->SpritePosition.y;
|
||||
ps->bounds.x_end = rotBoundBoxSize.x + rotBoundBoxOffset.x + session.SpritePosition.x;
|
||||
ps->bounds.y_end = rotBoundBoxSize.y + rotBoundBoxOffset.y + session.SpritePosition.y;
|
||||
ps->bounds.z_end = rotBoundBoxSize.z + rotBoundBoxOffset.z;
|
||||
ps->bounds.x = rotBoundBoxOffset.x + session->SpritePosition.x;
|
||||
ps->bounds.y = rotBoundBoxOffset.y + session->SpritePosition.y;
|
||||
ps->bounds.x = rotBoundBoxOffset.x + session.SpritePosition.x;
|
||||
ps->bounds.y = rotBoundBoxOffset.y + session.SpritePosition.y;
|
||||
ps->bounds.z = rotBoundBoxOffset.z;
|
||||
ps->flags = 0;
|
||||
ps->attached_ps = nullptr;
|
||||
ps->children = nullptr;
|
||||
ps->sprite_type = session->InteractionType;
|
||||
ps->map_x = session->MapPosition.x;
|
||||
ps->map_y = session->MapPosition.y;
|
||||
ps->tileElement = reinterpret_cast<TileElement*>(const_cast<void*>(session->CurrentlyDrawnItem));
|
||||
ps->sprite_type = session.InteractionType;
|
||||
ps->map_x = session.MapPosition.x;
|
||||
ps->map_y = session.MapPosition.y;
|
||||
ps->tileElement = reinterpret_cast<TileElement*>(const_cast<void*>(session.CurrentlyDrawnItem));
|
||||
|
||||
return ps;
|
||||
}
|
||||
|
||||
template<uint8_t direction> void PaintSessionGenerateRotate(paint_session* session)
|
||||
template<uint8_t direction> void PaintSessionGenerateRotate(paint_session& session)
|
||||
{
|
||||
// Optimised modified version of viewport_coord_to_map_coord
|
||||
ScreenCoordsXY screenCoord = { floor2(session->DPI.x, 32), floor2((session->DPI.y - 16), 32) };
|
||||
ScreenCoordsXY screenCoord = { floor2(session.DPI.x, 32), floor2((session.DPI.y - 16), 32) };
|
||||
CoordsXY mapTile = { screenCoord.y - screenCoord.x / 2, screenCoord.y + screenCoord.x / 2 };
|
||||
mapTile = mapTile.Rotate(direction);
|
||||
|
||||
@@ -209,7 +209,7 @@ template<uint8_t direction> void PaintSessionGenerateRotate(paint_session* sessi
|
||||
}
|
||||
mapTile = mapTile.ToTileStart();
|
||||
|
||||
uint16_t numVerticalTiles = (session->DPI.height + 2128) >> 5;
|
||||
uint16_t numVerticalTiles = (session.DPI.height + 2128) >> 5;
|
||||
|
||||
// Adjacent tiles to also check due to overlapping of sprites
|
||||
constexpr CoordsXY adjacentTiles[] = {
|
||||
@@ -242,10 +242,10 @@ template<uint8_t direction> void PaintSessionGenerateRotate(paint_session* sessi
|
||||
*
|
||||
* rct2: 0x0068B6C2
|
||||
*/
|
||||
void PaintSessionGenerate(paint_session* session)
|
||||
void PaintSessionGenerate(paint_session& session)
|
||||
{
|
||||
session->CurrentRotation = get_current_rotation();
|
||||
switch (DirectionFlipXAxis(session->CurrentRotation))
|
||||
session.CurrentRotation = get_current_rotation();
|
||||
switch (DirectionFlipXAxis(session.CurrentRotation))
|
||||
{
|
||||
case 0:
|
||||
PaintSessionGenerateRotate<0>(session);
|
||||
@@ -424,19 +424,19 @@ static paint_struct* PaintArrangeStructsHelperRotation(paint_struct* ps_next, ui
|
||||
}
|
||||
}
|
||||
|
||||
template<int TRotation> static void PaintSessionArrange(PaintSessionCore* session, bool)
|
||||
template<int TRotation> static void PaintSessionArrange(PaintSessionCore& session, bool)
|
||||
{
|
||||
paint_struct* psHead = &session->PaintHead;
|
||||
paint_struct* psHead = &session.PaintHead;
|
||||
|
||||
paint_struct* ps = psHead;
|
||||
ps->next_quadrant_ps = nullptr;
|
||||
|
||||
uint32_t quadrantIndex = session->QuadrantBackIndex;
|
||||
uint32_t quadrantIndex = session.QuadrantBackIndex;
|
||||
if (quadrantIndex != UINT32_MAX)
|
||||
{
|
||||
do
|
||||
{
|
||||
paint_struct* ps_next = session->Quadrants[quadrantIndex];
|
||||
paint_struct* ps_next = session.Quadrants[quadrantIndex];
|
||||
if (ps_next != nullptr)
|
||||
{
|
||||
ps->next_quadrant_ps = ps_next;
|
||||
@@ -447,13 +447,13 @@ template<int TRotation> static void PaintSessionArrange(PaintSessionCore* sessio
|
||||
|
||||
} while (ps_next != nullptr);
|
||||
}
|
||||
} while (++quadrantIndex <= session->QuadrantFrontIndex);
|
||||
} while (++quadrantIndex <= session.QuadrantFrontIndex);
|
||||
|
||||
paint_struct* ps_cache = PaintArrangeStructsHelperRotation<TRotation>(
|
||||
psHead, session->QuadrantBackIndex & 0xFFFF, PaintSortFlags::Neighbour);
|
||||
psHead, session.QuadrantBackIndex & 0xFFFF, PaintSortFlags::Neighbour);
|
||||
|
||||
quadrantIndex = session->QuadrantBackIndex;
|
||||
while (++quadrantIndex < session->QuadrantFrontIndex)
|
||||
quadrantIndex = session.QuadrantBackIndex;
|
||||
while (++quadrantIndex < session.QuadrantFrontIndex)
|
||||
{
|
||||
ps_cache = PaintArrangeStructsHelperRotation<TRotation>(ps_cache, quadrantIndex & 0xFFFF, PaintSortFlags::None);
|
||||
}
|
||||
@@ -464,9 +464,9 @@ template<int TRotation> static void PaintSessionArrange(PaintSessionCore* sessio
|
||||
*
|
||||
* rct2: 0x00688217
|
||||
*/
|
||||
void PaintSessionArrange(PaintSessionCore* session)
|
||||
void PaintSessionArrange(PaintSessionCore& session)
|
||||
{
|
||||
switch (session->CurrentRotation)
|
||||
switch (session.CurrentRotation)
|
||||
{
|
||||
case 0:
|
||||
return PaintSessionArrange<0>(session, true);
|
||||
@@ -480,9 +480,9 @@ void PaintSessionArrange(PaintSessionCore* session)
|
||||
Guard::Assert(false);
|
||||
}
|
||||
|
||||
static void PaintDrawStruct(paint_session* session, paint_struct* ps)
|
||||
static void PaintDrawStruct(paint_session& session, paint_struct* ps)
|
||||
{
|
||||
rct_drawpixelinfo* dpi = &session->DPI;
|
||||
rct_drawpixelinfo* dpi = &session.DPI;
|
||||
|
||||
auto x = ps->x;
|
||||
auto y = ps->y;
|
||||
@@ -501,7 +501,7 @@ static void PaintDrawStruct(paint_session* session, paint_struct* ps)
|
||||
}
|
||||
}
|
||||
|
||||
auto imageId = PaintPSColourifyImage(ps->image_id, ps->sprite_type, session->ViewFlags);
|
||||
auto imageId = PaintPSColourifyImage(ps->image_id, ps->sprite_type, session.ViewFlags);
|
||||
if (gPaintBoundingBoxes && dpi->zoom_level == ZoomLevel{ 0 })
|
||||
{
|
||||
PaintPSImageWithBoundingBoxes(dpi, ps, imageId, x, y);
|
||||
@@ -517,7 +517,7 @@ static void PaintDrawStruct(paint_session* session, paint_struct* ps)
|
||||
}
|
||||
else
|
||||
{
|
||||
PaintAttachedPS(dpi, ps, session->ViewFlags);
|
||||
PaintAttachedPS(dpi, ps, session.ViewFlags);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -525,9 +525,9 @@ static void PaintDrawStruct(paint_session* session, paint_struct* ps)
|
||||
*
|
||||
* rct2: 0x00688485
|
||||
*/
|
||||
void PaintDrawStructs(paint_session* session)
|
||||
void PaintDrawStructs(paint_session& session)
|
||||
{
|
||||
paint_struct* ps = &session->PaintHead;
|
||||
paint_struct* ps = &session.PaintHead;
|
||||
|
||||
for (ps = ps->next_quadrant_ps; ps != nullptr;)
|
||||
{
|
||||
@@ -724,20 +724,20 @@ void PaintSessionFree([[maybe_unused]] paint_session* session)
|
||||
* @return (ebp) paint_struct on success (CF == 0), nullptr on failure (CF == 1)
|
||||
*/
|
||||
paint_struct* PaintAddImageAsParent(
|
||||
paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize)
|
||||
paint_session& session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize)
|
||||
{
|
||||
return PaintAddImageAsParent(session, ImageId::FromUInt32(image_id), offset, boundBoxSize, offset);
|
||||
}
|
||||
|
||||
paint_struct* PaintAddImageAsParent(
|
||||
paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
|
||||
paint_session& session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
|
||||
const CoordsXYZ& boundBoxOffset)
|
||||
{
|
||||
return PaintAddImageAsParent(session, ImageId::FromUInt32(image_id), offset, boundBoxSize, boundBoxOffset);
|
||||
}
|
||||
|
||||
paint_struct* PaintAddImageAsParent(
|
||||
paint_session* session, ImageId imageId, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize)
|
||||
paint_session& session, ImageId imageId, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize)
|
||||
{
|
||||
return PaintAddImageAsParent(session, imageId, offset, boundBoxSize, offset);
|
||||
}
|
||||
@@ -759,11 +759,11 @@ paint_struct* PaintAddImageAsParent(
|
||||
*/
|
||||
// Track Pieces, Shops.
|
||||
paint_struct* PaintAddImageAsParent(
|
||||
paint_session* session, ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
|
||||
paint_session& session, ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
|
||||
const CoordsXYZ& boundBoxOffset)
|
||||
{
|
||||
session->LastPS = nullptr;
|
||||
session->LastAttachedPS = nullptr;
|
||||
session.LastPS = nullptr;
|
||||
session.LastAttachedPS = nullptr;
|
||||
|
||||
auto* ps = CreateNormalPaintStruct(session, image_id, offset, boundBoxSize, boundBoxOffset);
|
||||
if (ps == nullptr)
|
||||
@@ -794,16 +794,16 @@ paint_struct* PaintAddImageAsParent(
|
||||
* Creates a paint struct but does not allocate to a paint quadrant. Result cannot be ignored!
|
||||
*/
|
||||
[[nodiscard]] paint_struct* PaintAddImageAsOrphan(
|
||||
paint_session* session, ImageId imageId, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
|
||||
paint_session& session, ImageId imageId, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
|
||||
const CoordsXYZ& boundBoxOffset)
|
||||
{
|
||||
session->LastPS = nullptr;
|
||||
session->LastAttachedPS = nullptr;
|
||||
session.LastPS = nullptr;
|
||||
session.LastAttachedPS = nullptr;
|
||||
return CreateNormalPaintStruct(session, imageId, offset, boundBoxSize, boundBoxOffset);
|
||||
}
|
||||
|
||||
paint_struct* PaintAddImageAsChild(
|
||||
paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxLength,
|
||||
paint_session& session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxLength,
|
||||
const CoordsXYZ& boundBoxOffset)
|
||||
{
|
||||
return PaintAddImageAsChild(session, ImageId::FromUInt32(image_id), offset, boundBoxLength, boundBoxOffset);
|
||||
@@ -827,10 +827,10 @@ paint_struct* PaintAddImageAsChild(
|
||||
* If there is no parent paint struct then image is added as a parent
|
||||
*/
|
||||
paint_struct* PaintAddImageAsChild(
|
||||
paint_session* session, ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxLength,
|
||||
paint_session& session, ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxLength,
|
||||
const CoordsXYZ& boundBoxOffset)
|
||||
{
|
||||
paint_struct* parentPS = session->LastPS;
|
||||
paint_struct* parentPS = session.LastPS;
|
||||
if (parentPS == nullptr)
|
||||
{
|
||||
return PaintAddImageAsParent(session, image_id, offset, boundBoxLength, boundBoxOffset);
|
||||
@@ -848,7 +848,7 @@ paint_struct* PaintAddImageAsChild(
|
||||
}
|
||||
|
||||
paint_struct* PaintAddImageAsChild(
|
||||
paint_session* session, uint32_t image_id, int32_t x_offset, int32_t y_offset, int32_t bound_box_length_x,
|
||||
paint_session& session, uint32_t image_id, int32_t x_offset, int32_t y_offset, int32_t bound_box_length_x,
|
||||
int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset, int32_t bound_box_offset_x,
|
||||
int32_t bound_box_offset_y, int32_t bound_box_offset_z)
|
||||
{
|
||||
@@ -865,15 +865,15 @@ paint_struct* PaintAddImageAsChild(
|
||||
* @param y (cx)
|
||||
* @return (!CF) success
|
||||
*/
|
||||
bool PaintAttachToPreviousAttach(paint_session* session, ImageId imageId, int32_t x, int32_t y)
|
||||
bool PaintAttachToPreviousAttach(paint_session& session, ImageId imageId, int32_t x, int32_t y)
|
||||
{
|
||||
auto* previousAttachedPS = session->LastAttachedPS;
|
||||
auto* previousAttachedPS = session.LastAttachedPS;
|
||||
if (previousAttachedPS == nullptr)
|
||||
{
|
||||
return PaintAttachToPreviousPS(session, imageId, x, y);
|
||||
}
|
||||
|
||||
auto* ps = session->AllocateAttachedPaintEntry();
|
||||
auto* ps = session.AllocateAttachedPaintEntry();
|
||||
if (ps == nullptr)
|
||||
{
|
||||
return false;
|
||||
@@ -898,20 +898,20 @@ bool PaintAttachToPreviousAttach(paint_session* session, ImageId imageId, int32_
|
||||
* @param y (cx)
|
||||
* @return (!CF) success
|
||||
*/
|
||||
bool PaintAttachToPreviousPS(paint_session* session, uint32_t image_id, int32_t x, int32_t y)
|
||||
bool PaintAttachToPreviousPS(paint_session& session, uint32_t image_id, int32_t x, int32_t y)
|
||||
{
|
||||
return PaintAttachToPreviousPS(session, ImageId::FromUInt32(image_id), x, y);
|
||||
}
|
||||
|
||||
bool PaintAttachToPreviousPS(paint_session* session, ImageId image_id, int32_t x, int32_t y)
|
||||
bool PaintAttachToPreviousPS(paint_session& session, ImageId image_id, int32_t x, int32_t y)
|
||||
{
|
||||
auto* masterPs = session->LastPS;
|
||||
auto* masterPs = session.LastPS;
|
||||
if (masterPs == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
auto* ps = session->AllocateAttachedPaintEntry();
|
||||
auto* ps = session.AllocateAttachedPaintEntry();
|
||||
if (ps == nullptr)
|
||||
{
|
||||
return false;
|
||||
@@ -940,18 +940,18 @@ bool PaintAttachToPreviousPS(paint_session* session, ImageId image_id, int32_t x
|
||||
* @param rotation (ebp)
|
||||
*/
|
||||
void PaintFloatingMoneyEffect(
|
||||
paint_session* session, money64 amount, rct_string_id string_id, int32_t y, int32_t z, int8_t y_offsets[], int32_t offset_x,
|
||||
paint_session& session, money64 amount, rct_string_id string_id, int32_t y, int32_t z, int8_t y_offsets[], int32_t offset_x,
|
||||
uint32_t rotation)
|
||||
{
|
||||
auto* ps = session->AllocateStringPaintEntry();
|
||||
auto* ps = session.AllocateStringPaintEntry();
|
||||
if (ps == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const CoordsXYZ position = {
|
||||
session->SpritePosition.x,
|
||||
session->SpritePosition.y,
|
||||
session.SpritePosition.x,
|
||||
session.SpritePosition.y,
|
||||
z,
|
||||
};
|
||||
const auto coord = translate_3d_to_2d_with_z(rotation, position);
|
||||
|
||||
+22
-22
@@ -297,64 +297,64 @@ extern bool gPaintBlockedTiles;
|
||||
extern bool gPaintWidePathsAsGhost;
|
||||
|
||||
paint_struct* PaintAddImageAsParent(
|
||||
paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize);
|
||||
paint_session& session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize);
|
||||
paint_struct* PaintAddImageAsParent(
|
||||
paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
|
||||
paint_session& session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
|
||||
const CoordsXYZ& boundBoxOffset);
|
||||
paint_struct* PaintAddImageAsParent(
|
||||
paint_session* session, ImageId imageId, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize);
|
||||
paint_session& session, ImageId imageId, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize);
|
||||
paint_struct* PaintAddImageAsParent(
|
||||
paint_session* session, ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
|
||||
paint_session& session, ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
|
||||
const CoordsXYZ& boundBoxOffset);
|
||||
[[nodiscard]] paint_struct* PaintAddImageAsOrphan(
|
||||
paint_session* session, ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
|
||||
paint_session& session, ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
|
||||
const CoordsXYZ& boundBoxOffset);
|
||||
paint_struct* PaintAddImageAsChild(
|
||||
paint_session* session, uint32_t image_id, int32_t x_offset, int32_t y_offset, int32_t bound_box_length_x,
|
||||
paint_session& session, uint32_t image_id, int32_t x_offset, int32_t y_offset, int32_t bound_box_length_x,
|
||||
int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset, int32_t bound_box_offset_x,
|
||||
int32_t bound_box_offset_y, int32_t bound_box_offset_z);
|
||||
paint_struct* PaintAddImageAsChild(
|
||||
paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxLength,
|
||||
paint_session& session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxLength,
|
||||
const CoordsXYZ& boundBoxOffset);
|
||||
paint_struct* PaintAddImageAsChild(
|
||||
paint_session* session, ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxLength,
|
||||
paint_session& session, ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxLength,
|
||||
const CoordsXYZ& boundBoxOffset);
|
||||
|
||||
paint_struct* PaintAddImageAsParentRotated(
|
||||
paint_session* session, uint8_t direction, uint32_t image_id, int32_t x_offset, int32_t y_offset,
|
||||
paint_session& session, uint8_t direction, uint32_t image_id, int32_t x_offset, int32_t y_offset,
|
||||
int32_t bound_box_length_x, int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset);
|
||||
paint_struct* PaintAddImageAsParentRotated(
|
||||
paint_session* session, uint8_t direction, uint32_t image_id, int32_t x_offset, int32_t y_offset,
|
||||
paint_session& session, uint8_t direction, uint32_t image_id, int32_t x_offset, int32_t y_offset,
|
||||
int32_t bound_box_length_x, int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset,
|
||||
int32_t bound_box_offset_x, int32_t bound_box_offset_y, int32_t bound_box_offset_z);
|
||||
paint_struct* PaintAddImageAsChildRotated(
|
||||
paint_session* session, uint8_t direction, uint32_t image_id, int32_t x_offset, int32_t y_offset,
|
||||
paint_session& session, uint8_t direction, uint32_t image_id, int32_t x_offset, int32_t y_offset,
|
||||
int32_t bound_box_length_x, int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset,
|
||||
int32_t bound_box_offset_x, int32_t bound_box_offset_y, int32_t bound_box_offset_z);
|
||||
paint_struct* PaintAddImageAsChildRotated(
|
||||
paint_session* session, const uint8_t direction, const uint32_t image_id, const CoordsXYZ& offset,
|
||||
paint_session& session, const uint8_t direction, const uint32_t image_id, const CoordsXYZ& offset,
|
||||
const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset);
|
||||
paint_struct* PaintAddImageAsParentRotated(
|
||||
paint_session* session, const uint8_t direction, const uint32_t image_id, const CoordsXYZ& offset,
|
||||
paint_session& session, const uint8_t direction, const uint32_t image_id, const CoordsXYZ& offset,
|
||||
const CoordsXYZ& boundBoxSize);
|
||||
paint_struct* PaintAddImageAsParentRotated(
|
||||
paint_session* session, const uint8_t direction, const uint32_t image_id, const CoordsXYZ& offset,
|
||||
paint_session& session, const uint8_t direction, const uint32_t image_id, const CoordsXYZ& offset,
|
||||
const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset);
|
||||
|
||||
void paint_util_push_tunnel_rotated(paint_session* session, uint8_t direction, uint16_t height, uint8_t type);
|
||||
void paint_util_push_tunnel_rotated(paint_session& session, uint8_t direction, uint16_t height, uint8_t type);
|
||||
|
||||
bool PaintAttachToPreviousAttach(paint_session* session, ImageId imageId, int32_t x, int32_t y);
|
||||
bool PaintAttachToPreviousPS(paint_session* session, ImageId image_id, int32_t x, int32_t y);
|
||||
bool PaintAttachToPreviousPS(paint_session* session, uint32_t image_id, int32_t x, int32_t y);
|
||||
bool PaintAttachToPreviousAttach(paint_session& session, ImageId imageId, int32_t x, int32_t y);
|
||||
bool PaintAttachToPreviousPS(paint_session& session, ImageId image_id, int32_t x, int32_t y);
|
||||
bool PaintAttachToPreviousPS(paint_session& session, uint32_t image_id, int32_t x, int32_t y);
|
||||
void PaintFloatingMoneyEffect(
|
||||
paint_session* session, money64 amount, rct_string_id string_id, int32_t y, int32_t z, int8_t y_offsets[], int32_t offset_x,
|
||||
paint_session& session, money64 amount, rct_string_id string_id, int32_t y, int32_t z, int8_t y_offsets[], int32_t offset_x,
|
||||
uint32_t rotation);
|
||||
|
||||
paint_session* PaintSessionAlloc(rct_drawpixelinfo* dpi, uint32_t viewFlags);
|
||||
void PaintSessionFree(paint_session* session);
|
||||
void PaintSessionGenerate(paint_session* session);
|
||||
void PaintSessionArrange(PaintSessionCore* session);
|
||||
void PaintDrawStructs(paint_session* session);
|
||||
void PaintSessionGenerate(paint_session& session);
|
||||
void PaintSessionArrange(PaintSessionCore& session);
|
||||
void PaintDrawStructs(paint_session& session);
|
||||
void PaintDrawMoneyStructs(rct_drawpixelinfo* dpi, paint_string_struct* ps);
|
||||
|
||||
// TESTING
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "Paint.h"
|
||||
|
||||
paint_struct* PaintAddImageAsParentRotated(
|
||||
paint_session* session, uint8_t direction, uint32_t image_id, int32_t x_offset, int32_t y_offset,
|
||||
paint_session& session, uint8_t direction, uint32_t image_id, int32_t x_offset, int32_t y_offset,
|
||||
int32_t bound_box_length_x, int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset)
|
||||
{
|
||||
if (direction & 1)
|
||||
@@ -27,7 +27,7 @@ paint_struct* PaintAddImageAsParentRotated(
|
||||
}
|
||||
|
||||
paint_struct* PaintAddImageAsParentRotated(
|
||||
paint_session* session, uint8_t direction, uint32_t image_id, int32_t x_offset, int32_t y_offset,
|
||||
paint_session& session, uint8_t direction, uint32_t image_id, int32_t x_offset, int32_t y_offset,
|
||||
int32_t bound_box_length_x, int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset,
|
||||
int32_t bound_box_offset_x, int32_t bound_box_offset_y, int32_t bound_box_offset_z)
|
||||
{
|
||||
@@ -44,7 +44,7 @@ paint_struct* PaintAddImageAsParentRotated(
|
||||
}
|
||||
|
||||
paint_struct* PaintAddImageAsParentRotated(
|
||||
paint_session* session, const uint8_t direction, const uint32_t image_id, const CoordsXYZ& offset,
|
||||
paint_session& session, const uint8_t direction, const uint32_t image_id, const CoordsXYZ& offset,
|
||||
const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset)
|
||||
{
|
||||
if (direction & 1)
|
||||
@@ -58,7 +58,7 @@ paint_struct* PaintAddImageAsParentRotated(
|
||||
}
|
||||
|
||||
paint_struct* PaintAddImageAsParentRotated(
|
||||
paint_session* session, const uint8_t direction, const uint32_t image_id, const CoordsXYZ& offset,
|
||||
paint_session& session, const uint8_t direction, const uint32_t image_id, const CoordsXYZ& offset,
|
||||
const CoordsXYZ& boundBoxSize)
|
||||
{
|
||||
if (direction & 1)
|
||||
@@ -71,7 +71,7 @@ paint_struct* PaintAddImageAsParentRotated(
|
||||
}
|
||||
|
||||
paint_struct* PaintAddImageAsChildRotated(
|
||||
paint_session* session, uint8_t direction, uint32_t image_id, int32_t x_offset, int32_t y_offset,
|
||||
paint_session& session, uint8_t direction, uint32_t image_id, int32_t x_offset, int32_t y_offset,
|
||||
int32_t bound_box_length_x, int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset,
|
||||
int32_t bound_box_offset_x, int32_t bound_box_offset_y, int32_t bound_box_offset_z)
|
||||
{
|
||||
@@ -88,7 +88,7 @@ paint_struct* PaintAddImageAsChildRotated(
|
||||
}
|
||||
|
||||
paint_struct* PaintAddImageAsChildRotated(
|
||||
paint_session* session, const uint8_t direction, const uint32_t image_id, const CoordsXYZ& offset,
|
||||
paint_session& session, const uint8_t direction, const uint32_t image_id, const CoordsXYZ& offset,
|
||||
const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset)
|
||||
{
|
||||
if (direction & 1)
|
||||
@@ -101,7 +101,7 @@ paint_struct* PaintAddImageAsChildRotated(
|
||||
return PaintAddImageAsChild(session, image_id, offset, boundBoxSize, boundBoxOffset);
|
||||
}
|
||||
|
||||
void paint_util_push_tunnel_rotated(paint_session* session, uint8_t direction, uint16_t height, uint8_t type)
|
||||
void paint_util_push_tunnel_rotated(paint_session& session, uint8_t direction, uint16_t height, uint8_t type)
|
||||
{
|
||||
if (direction & 1)
|
||||
{
|
||||
|
||||
@@ -448,13 +448,13 @@ static constexpr const uint16_t word_97B3C4[] = {
|
||||
// clang-format on
|
||||
|
||||
bool wooden_a_supports_paint_setup(
|
||||
paint_session* session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags)
|
||||
paint_session& session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags)
|
||||
{
|
||||
return wooden_a_supports_paint_setup(session, supportType, special, height, ImageId::FromUInt32(imageColourFlags));
|
||||
}
|
||||
|
||||
bool wooden_b_supports_paint_setup(
|
||||
paint_session* session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags)
|
||||
paint_session& session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags)
|
||||
{
|
||||
return wooden_a_supports_paint_setup(session, supportType, special, height, ImageId::FromUInt32(imageColourFlags));
|
||||
}
|
||||
@@ -470,19 +470,19 @@ bool wooden_b_supports_paint_setup(
|
||||
* @returns (al) true if any supports have been drawn, otherwise false.
|
||||
*/
|
||||
bool wooden_a_supports_paint_setup(
|
||||
paint_session* session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate)
|
||||
paint_session& session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate)
|
||||
{
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(session->Unk141E9DB & PaintSessionFlags::IsPassedSurface))
|
||||
if (!(session.Unk141E9DB & PaintSessionFlags::IsPassedSurface))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t z = floor2(session->Support.height + 15, 16);
|
||||
int32_t z = floor2(session.Support.height + 15, 16);
|
||||
height -= z;
|
||||
if (height < 0)
|
||||
{
|
||||
@@ -494,7 +494,7 @@ bool wooden_a_supports_paint_setup(
|
||||
bool drawFlatPiece = false;
|
||||
|
||||
// Draw base support (usually shaped to the slope)
|
||||
int32_t slope = session->Support.slope;
|
||||
int32_t slope = session.Support.slope;
|
||||
if (slope & SUPPORTS_SLOPE_5)
|
||||
{
|
||||
// Above scenery (just put a base piece above it)
|
||||
@@ -558,7 +558,7 @@ bool wooden_a_supports_paint_setup(
|
||||
// Draw repeated supports for left over space
|
||||
while (height != 0)
|
||||
{
|
||||
if ((z & 16) == 0 && height >= 2 && z + 16 != session->WaterHeight)
|
||||
if ((z & 16) == 0 && height >= 2 && z + 16 != session.WaterHeight)
|
||||
{
|
||||
// Full support
|
||||
auto imageId = imageTemplate.WithIndex(WoodenSupportImageIds[supportType].full);
|
||||
@@ -592,7 +592,7 @@ bool wooden_a_supports_paint_setup(
|
||||
|
||||
unk_supports_desc_bound_box bBox = byte_97B23C[special].bounding_box;
|
||||
|
||||
if (byte_97B23C[special].var_6 == 0 || session->WoodenSupportsPrependTo == nullptr)
|
||||
if (byte_97B23C[special].var_6 == 0 || session.WoodenSupportsPrependTo == nullptr)
|
||||
{
|
||||
PaintAddImageAsParent(
|
||||
session, imageId, { 0, 0, z }, bBox.length, { bBox.offset.x, bBox.offset.y, bBox.offset.z + z });
|
||||
@@ -605,7 +605,7 @@ bool wooden_a_supports_paint_setup(
|
||||
session, imageId, { 0, 0, z }, bBox.length, { bBox.offset.x, bBox.offset.y, bBox.offset.z + z });
|
||||
if (ps != nullptr)
|
||||
{
|
||||
session->WoodenSupportsPrependTo->children = ps;
|
||||
session.WoodenSupportsPrependTo->children = ps;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -627,21 +627,21 @@ bool wooden_a_supports_paint_setup(
|
||||
* @return (al) whether supports have been drawn
|
||||
*/
|
||||
bool wooden_b_supports_paint_setup(
|
||||
paint_session* session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate)
|
||||
paint_session& session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate)
|
||||
{
|
||||
bool _9E32B1 = false;
|
||||
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(session->Unk141E9DB & PaintSessionFlags::IsPassedSurface))
|
||||
if (!(session.Unk141E9DB & PaintSessionFlags::IsPassedSurface))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
uint16_t baseHeight = ceil2(session->Support.height, 16);
|
||||
uint16_t baseHeight = ceil2(session.Support.height, 16);
|
||||
int16_t supportLength = height - baseHeight;
|
||||
|
||||
if (supportLength < 0)
|
||||
@@ -653,11 +653,11 @@ bool wooden_b_supports_paint_setup(
|
||||
|
||||
bool goTo662E8B = false;
|
||||
|
||||
if (session->Support.slope & 0x20)
|
||||
if (session.Support.slope & 0x20)
|
||||
{
|
||||
goTo662E8B = true;
|
||||
}
|
||||
else if (session->Support.slope & 0x10)
|
||||
else if (session.Support.slope & 0x10)
|
||||
{
|
||||
heightSteps -= 2;
|
||||
if (heightSteps < 0)
|
||||
@@ -674,7 +674,7 @@ bool wooden_b_supports_paint_setup(
|
||||
else
|
||||
{
|
||||
auto imageid = imageTemplate.WithIndex(
|
||||
imageIndex + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]);
|
||||
imageIndex + word_97B3C4[session.Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]);
|
||||
|
||||
PaintAddImageAsParent(session, imageid, { 0, 0, baseHeight }, { 32, 32, 11 }, { 0, 0, baseHeight + 2 });
|
||||
baseHeight += 16;
|
||||
@@ -686,7 +686,7 @@ bool wooden_b_supports_paint_setup(
|
||||
_9E32B1 = true;
|
||||
}
|
||||
}
|
||||
else if ((session->Support.slope & 0x0F) != 0)
|
||||
else if ((session.Support.slope & 0x0F) != 0)
|
||||
{
|
||||
heightSteps -= 1;
|
||||
if (heightSteps < 0)
|
||||
@@ -703,7 +703,7 @@ bool wooden_b_supports_paint_setup(
|
||||
else
|
||||
{
|
||||
auto imageId = imageTemplate.WithIndex(
|
||||
imageIndex + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]);
|
||||
imageIndex + word_97B3C4[session.Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]);
|
||||
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, baseHeight }, { 32, 32, 3 }, { 0, 0, baseHeight + 2 });
|
||||
baseHeight += 16;
|
||||
@@ -731,7 +731,7 @@ bool wooden_b_supports_paint_setup(
|
||||
{
|
||||
while (heightSteps > 0)
|
||||
{
|
||||
if (baseHeight & 0x10 || heightSteps == 1 || baseHeight + 16 == session->WaterHeight)
|
||||
if (baseHeight & 0x10 || heightSteps == 1 || baseHeight + 16 == session.WaterHeight)
|
||||
{
|
||||
auto imageId = imageTemplate.WithIndex(WoodenSupportImageIds[supportType].half);
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, baseHeight }, { 32, 32, ((heightSteps == 1) ? 7 : 12) });
|
||||
@@ -763,7 +763,7 @@ bool wooden_b_supports_paint_setup(
|
||||
|
||||
const unk_supports_desc_bound_box& boundBox = supportsDesc.bounding_box;
|
||||
|
||||
if (supportsDesc.var_6 == 0 || session->WoodenSupportsPrependTo == nullptr)
|
||||
if (supportsDesc.var_6 == 0 || session.WoodenSupportsPrependTo == nullptr)
|
||||
{
|
||||
PaintAddImageAsParent(
|
||||
session, imageId, { 0, 0, baseHeight }, boundBox.length,
|
||||
@@ -778,7 +778,7 @@ bool wooden_b_supports_paint_setup(
|
||||
_9E32B1 = true;
|
||||
if (paintStruct != nullptr)
|
||||
{
|
||||
session->WoodenSupportsPrependTo->children = paintStruct;
|
||||
session.WoodenSupportsPrependTo->children = paintStruct;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -797,16 +797,16 @@ bool wooden_b_supports_paint_setup(
|
||||
* rct2: 0x00663105
|
||||
*/
|
||||
bool metal_a_supports_paint_setup(
|
||||
paint_session* session, uint8_t supportType, uint8_t segment, int32_t special, int32_t height, uint32_t imageColourFlags)
|
||||
paint_session& session, uint8_t supportType, uint8_t segment, int32_t special, int32_t height, uint32_t imageColourFlags)
|
||||
{
|
||||
support_height* supportSegments = session->SupportSegments;
|
||||
support_height* supportSegments = session.SupportSegments;
|
||||
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(session->Unk141E9DB & PaintSessionFlags::IsPassedSurface))
|
||||
if (!(session.Unk141E9DB & PaintSessionFlags::IsPassedSurface))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -814,7 +814,7 @@ bool metal_a_supports_paint_setup(
|
||||
int16_t originalHeight = height;
|
||||
int32_t originalSegment = segment;
|
||||
|
||||
const uint8_t rotation = session->CurrentRotation;
|
||||
const uint8_t rotation = session.CurrentRotation;
|
||||
int16_t unk9E3294 = -1;
|
||||
if (height < supportSegments[segment].height)
|
||||
{
|
||||
@@ -995,17 +995,17 @@ bool metal_a_supports_paint_setup(
|
||||
* @return (Carry Flag)
|
||||
*/
|
||||
bool metal_b_supports_paint_setup(
|
||||
paint_session* session, uint8_t supportType, uint8_t segment, int32_t special, int32_t height, uint32_t imageColourFlags)
|
||||
paint_session& session, uint8_t supportType, uint8_t segment, int32_t special, int32_t height, uint32_t imageColourFlags)
|
||||
{
|
||||
support_height* supportSegments = session->SupportSegments;
|
||||
support_height* supportSegments = session.SupportSegments;
|
||||
uint8_t originalSegment = segment;
|
||||
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS)
|
||||
{
|
||||
return false; // AND
|
||||
}
|
||||
|
||||
if (!(session->Unk141E9DB & PaintSessionFlags::IsPassedSurface))
|
||||
if (!(session.Unk141E9DB & PaintSessionFlags::IsPassedSurface))
|
||||
{
|
||||
return false; // AND
|
||||
}
|
||||
@@ -1023,7 +1023,7 @@ bool metal_b_supports_paint_setup(
|
||||
return false; // AND
|
||||
}
|
||||
|
||||
uint16_t baseIndex = session->CurrentRotation * 2;
|
||||
uint16_t baseIndex = session.CurrentRotation * 2;
|
||||
|
||||
uint8_t ebp = _97AF32[baseIndex + segment * 8];
|
||||
if (baseHeight <= supportSegments[ebp].height)
|
||||
@@ -1172,7 +1172,7 @@ bool metal_b_supports_paint_setup(
|
||||
* @return Whether supports were drawn
|
||||
*/
|
||||
bool path_a_supports_paint_setup(
|
||||
paint_session* session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate,
|
||||
paint_session& session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate,
|
||||
const FootpathPaintInfo& pathPaintInfo, bool* underground)
|
||||
{
|
||||
if (underground != nullptr)
|
||||
@@ -1180,17 +1180,17 @@ bool path_a_supports_paint_setup(
|
||||
*underground = false; // AND
|
||||
}
|
||||
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(session->Unk141E9DB & PaintSessionFlags::IsPassedSurface))
|
||||
if (!(session.Unk141E9DB & PaintSessionFlags::IsPassedSurface))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
uint16_t baseHeight = ceil2(session->Support.height, 16);
|
||||
uint16_t baseHeight = ceil2(session.Support.height, 16);
|
||||
int32_t supportLength = height - baseHeight;
|
||||
if (supportLength < 0)
|
||||
{
|
||||
@@ -1203,14 +1203,14 @@ bool path_a_supports_paint_setup(
|
||||
|
||||
int16_t heightSteps = supportLength / 16;
|
||||
|
||||
if (session->Support.slope & 0x20)
|
||||
if (session.Support.slope & 0x20)
|
||||
{
|
||||
// save dx2
|
||||
PaintAddImageAsParent(
|
||||
session, imageTemplate.WithIndex(pathPaintInfo.BridgeImageId + 48), { 0, 0, baseHeight - 2 }, { 32, 32, 0 });
|
||||
hasSupports = true;
|
||||
}
|
||||
else if (session->Support.slope & 0x10)
|
||||
else if (session.Support.slope & 0x10)
|
||||
{
|
||||
heightSteps -= 2;
|
||||
if (heightSteps < 0)
|
||||
@@ -1220,7 +1220,7 @@ bool path_a_supports_paint_setup(
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t imageId = (supportType * 24) + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]
|
||||
uint32_t imageId = (supportType * 24) + word_97B3C4[session.Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]
|
||||
+ pathPaintInfo.BridgeImageId;
|
||||
|
||||
PaintAddImageAsParent(
|
||||
@@ -1233,7 +1233,7 @@ bool path_a_supports_paint_setup(
|
||||
|
||||
hasSupports = true;
|
||||
}
|
||||
else if (session->Support.slope & 0x0F)
|
||||
else if (session.Support.slope & 0x0F)
|
||||
{
|
||||
heightSteps -= 1;
|
||||
if (heightSteps < 0)
|
||||
@@ -1243,7 +1243,7 @@ bool path_a_supports_paint_setup(
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t ebx = (supportType * 24) + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]
|
||||
uint32_t ebx = (supportType * 24) + word_97B3C4[session.Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]
|
||||
+ pathPaintInfo.BridgeImageId;
|
||||
|
||||
PaintAddImageAsParent(
|
||||
@@ -1255,7 +1255,7 @@ bool path_a_supports_paint_setup(
|
||||
|
||||
while (heightSteps > 0)
|
||||
{
|
||||
if (baseHeight & 0x10 || heightSteps == 1 || baseHeight + 16 == session->WaterHeight)
|
||||
if (baseHeight & 0x10 || heightSteps == 1 || baseHeight + 16 == session.WaterHeight)
|
||||
{
|
||||
uint32_t imageId = (supportType * 24) + pathPaintInfo.BridgeImageId + 23;
|
||||
|
||||
@@ -1286,7 +1286,7 @@ bool path_a_supports_paint_setup(
|
||||
const unk_supports_desc& supportsDesc = byte_98D8D4[specialIndex];
|
||||
const unk_supports_desc_bound_box& boundBox = supportsDesc.bounding_box;
|
||||
|
||||
if (supportsDesc.var_6 == 0 || session->WoodenSupportsPrependTo == nullptr)
|
||||
if (supportsDesc.var_6 == 0 || session.WoodenSupportsPrependTo == nullptr)
|
||||
{
|
||||
PaintAddImageAsParent(
|
||||
session, imageTemplate.WithIndex(imageIndex), { 0, 0, baseHeight }, boundBox.length,
|
||||
@@ -1301,7 +1301,7 @@ bool path_a_supports_paint_setup(
|
||||
hasSupports = true;
|
||||
if (paintStruct != nullptr)
|
||||
{
|
||||
session->WoodenSupportsPrependTo->children = paintStruct;
|
||||
session.WoodenSupportsPrependTo->children = paintStruct;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1325,17 +1325,17 @@ bool path_a_supports_paint_setup(
|
||||
* @return Whether supports were drawn
|
||||
*/
|
||||
bool path_b_supports_paint_setup(
|
||||
paint_session* session, int32_t segment, int32_t special, int32_t height, ImageId imageTemplate,
|
||||
paint_session& session, int32_t segment, int32_t special, int32_t height, ImageId imageTemplate,
|
||||
const FootpathPaintInfo& pathPaintInfo)
|
||||
{
|
||||
support_height* supportSegments = session->SupportSegments;
|
||||
support_height* supportSegments = session.SupportSegments;
|
||||
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS)
|
||||
{
|
||||
return false; // AND
|
||||
}
|
||||
|
||||
if (!(session->Unk141E9DB & PaintSessionFlags::IsPassedSurface))
|
||||
if (!(session.Unk141E9DB & PaintSessionFlags::IsPassedSurface))
|
||||
{
|
||||
return false; // AND
|
||||
}
|
||||
|
||||
@@ -18,22 +18,22 @@ struct FootpathPaintInfo;
|
||||
constexpr const uint8_t NumVanillaWoodenSupportTypes = 49;
|
||||
|
||||
bool wooden_a_supports_paint_setup(
|
||||
paint_session* session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate);
|
||||
paint_session& session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate);
|
||||
bool wooden_b_supports_paint_setup(
|
||||
paint_session* session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate);
|
||||
paint_session& session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate);
|
||||
bool wooden_a_supports_paint_setup(
|
||||
paint_session* session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags);
|
||||
paint_session& session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags);
|
||||
bool wooden_b_supports_paint_setup(
|
||||
paint_session* session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags);
|
||||
paint_session& session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags);
|
||||
bool metal_a_supports_paint_setup(
|
||||
paint_session* session, uint8_t supportType, uint8_t segment, int32_t special, int32_t height, uint32_t imageColourFlags);
|
||||
paint_session& session, uint8_t supportType, uint8_t segment, int32_t special, int32_t height, uint32_t imageColourFlags);
|
||||
bool metal_b_supports_paint_setup(
|
||||
paint_session* session, uint8_t supportType, uint8_t segment, int32_t special, int32_t height, uint32_t imageColourFlags);
|
||||
paint_session& session, uint8_t supportType, uint8_t segment, int32_t special, int32_t height, uint32_t imageColourFlags);
|
||||
bool path_a_supports_paint_setup(
|
||||
paint_session* session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate,
|
||||
paint_session& session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate,
|
||||
const FootpathPaintInfo& pathPaintInfo, bool* underground);
|
||||
bool path_b_supports_paint_setup(
|
||||
paint_session* session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate,
|
||||
paint_session& session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate,
|
||||
const FootpathPaintInfo& pathPaintInfo);
|
||||
|
||||
// There are 13 types of metal supports. A graphic showing all of them is available here:
|
||||
|
||||
@@ -289,7 +289,7 @@ static void virtual_floor_get_tile_properties(
|
||||
}
|
||||
}
|
||||
|
||||
void virtual_floor_paint(paint_session* session)
|
||||
void virtual_floor_paint(paint_session& session)
|
||||
{
|
||||
static constexpr const CoordsXY scenery_half_tile_offsets[4] = {
|
||||
{ -COORDS_XY_STEP, 0 },
|
||||
@@ -301,10 +301,10 @@ void virtual_floor_paint(paint_session* session)
|
||||
if (_virtualFloorHeight < MINIMUM_LAND_HEIGHT)
|
||||
return;
|
||||
|
||||
uint8_t direction = session->CurrentRotation;
|
||||
uint8_t direction = session.CurrentRotation;
|
||||
|
||||
// This is a virtual floor, so no interactions
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
|
||||
int16_t virtualFloorClipHeight = _virtualFloorHeight;
|
||||
|
||||
@@ -318,7 +318,7 @@ void virtual_floor_paint(paint_session* session)
|
||||
uint8_t litEdges = 0;
|
||||
|
||||
virtual_floor_get_tile_properties(
|
||||
session->MapPosition, virtualFloorClipHeight, &weAreOccupied, &weAreOwned, &occupiedEdges, &weAreBelowGround,
|
||||
session.MapPosition, virtualFloorClipHeight, &weAreOccupied, &weAreOwned, &occupiedEdges, &weAreBelowGround,
|
||||
&weAreAboveGround, &weAreLit);
|
||||
|
||||
// Move the bits around to match the current rotation
|
||||
@@ -331,7 +331,7 @@ void virtual_floor_paint(paint_session* session)
|
||||
for (uint8_t i = 0; i < NumOrthogonalDirections; i++)
|
||||
{
|
||||
uint8_t effectiveRotation = (NumOrthogonalDirections + i - direction) % NumOrthogonalDirections;
|
||||
CoordsXY theirLocation = session->MapPosition + scenery_half_tile_offsets[effectiveRotation];
|
||||
CoordsXY theirLocation = session.MapPosition + scenery_half_tile_offsets[effectiveRotation];
|
||||
|
||||
bool theyAreOccupied;
|
||||
uint8_t theirOccupiedEdges;
|
||||
|
||||
@@ -33,4 +33,4 @@ void virtual_floor_invalidate();
|
||||
|
||||
bool virtual_floor_tile_is_floor(const CoordsXY& loc);
|
||||
|
||||
void virtual_floor_paint(paint_session* session);
|
||||
void virtual_floor_paint(paint_session& session);
|
||||
@@ -30,7 +30,7 @@ constexpr CoordsXY BannerBoundBoxes[][2] = {
|
||||
};
|
||||
|
||||
static void PaintBannerScrollingText(
|
||||
paint_session* session, const BannerSceneryEntry& bannerEntry, Banner& banner, const BannerElement& bannerElement,
|
||||
paint_session& session, const BannerSceneryEntry& bannerEntry, Banner& banner, const BannerElement& bannerElement,
|
||||
Direction direction, int32_t height, const CoordsXYZ& bbOffset)
|
||||
{
|
||||
// If text on hidden direction or ghost
|
||||
@@ -63,10 +63,10 @@ static void PaintBannerScrollingText(
|
||||
PaintAddImageAsChild(session, imageId, { 0, 0, height + 22 }, { 1, 1, 21 }, bbOffset);
|
||||
}
|
||||
|
||||
void PaintBanner(paint_session* session, uint8_t direction, int32_t height, const BannerElement& bannerElement)
|
||||
void PaintBanner(paint_session& session, uint8_t direction, int32_t height, const BannerElement& bannerElement)
|
||||
{
|
||||
if (session->DPI.zoom_level > ZoomLevel{ 1 } || gTrackDesignSaveMode
|
||||
|| (session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
if (session.DPI.zoom_level > ZoomLevel{ 1 } || gTrackDesignSaveMode
|
||||
|| (session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
return;
|
||||
|
||||
auto banner = bannerElement.GetBanner();
|
||||
@@ -81,7 +81,7 @@ void PaintBanner(paint_session* session, uint8_t direction, int32_t height, cons
|
||||
return;
|
||||
}
|
||||
|
||||
session->InteractionType = ViewportInteractionItem::Banner;
|
||||
session.InteractionType = ViewportInteractionItem::Banner;
|
||||
|
||||
height -= 16;
|
||||
|
||||
@@ -91,7 +91,7 @@ void PaintBanner(paint_session* session, uint8_t direction, int32_t height, cons
|
||||
ImageId imageTemplate;
|
||||
if (bannerElement.IsGhost())
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
imageTemplate = ImageId().WithRemap(FilterPaletteID::Palette44);
|
||||
}
|
||||
else if (OpenRCT2::TileInspector::IsElementSelected(reinterpret_cast<const TileElement*>(&bannerElement)))
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
using namespace OpenRCT2;
|
||||
|
||||
static void PaintRideEntranceExitScrollingText(
|
||||
paint_session* session, const EntranceElement& entranceEl, const StationObject& stationObj, Direction direction,
|
||||
paint_session& session, const EntranceElement& entranceEl, const StationObject& stationObj, Direction direction,
|
||||
int32_t height)
|
||||
{
|
||||
if (stationObj.ScrollingMode == SCROLLING_MODE_NONE)
|
||||
@@ -73,39 +73,39 @@ static void PaintRideEntranceExitScrollingText(
|
||||
0, 28, 28, 51, height + stationObj.Height, 2, 2, height + stationObj.Height);
|
||||
}
|
||||
|
||||
static void PaintRideEntranceExitLightEffects(paint_session* session, int32_t height, const EntranceElement& entranceEl)
|
||||
static void PaintRideEntranceExitLightEffects(paint_session& session, int32_t height, const EntranceElement& entranceEl)
|
||||
{
|
||||
#ifdef __ENABLE_LIGHTFX__
|
||||
if (lightfx_is_available())
|
||||
{
|
||||
if (entranceEl.GetEntranceType() == ENTRANCE_TYPE_RIDE_ENTRANCE)
|
||||
{
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session->MapPosition, 0, 0, height + 45, LightType::Lantern3);
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 0, 0, height + 45, LightType::Lantern3);
|
||||
}
|
||||
|
||||
switch (entranceEl.GetDirection())
|
||||
{
|
||||
case 0:
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session->MapPosition, 16, 0, height + 16, LightType::Lantern2);
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 16, 0, height + 16, LightType::Lantern2);
|
||||
break;
|
||||
case 1:
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session->MapPosition, 0, -16, height + 16, LightType::Lantern2);
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 0, -16, height + 16, LightType::Lantern2);
|
||||
break;
|
||||
case 2:
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session->MapPosition, -16, 0, height + 16, LightType::Lantern2);
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, -16, 0, height + 16, LightType::Lantern2);
|
||||
break;
|
||||
case 3:
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session->MapPosition, 0, 16, height + 16, LightType::Lantern2);
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 0, 16, height + 16, LightType::Lantern2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void PaintRideEntranceExit(paint_session* session, uint8_t direction, int32_t height, const EntranceElement& entranceEl)
|
||||
static void PaintRideEntranceExit(paint_session& session, uint8_t direction, int32_t height, const EntranceElement& entranceEl)
|
||||
{
|
||||
auto rideIndex = entranceEl.GetRideIndex();
|
||||
if ((gTrackDesignSaveMode || (session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
if ((gTrackDesignSaveMode || (session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
&& (rideIndex != gTrackDesignSaveRideIndex))
|
||||
{
|
||||
return;
|
||||
@@ -123,7 +123,7 @@ static void PaintRideEntranceExit(paint_session* session, uint8_t direction, int
|
||||
return;
|
||||
}
|
||||
|
||||
session->InteractionType = ViewportInteractionItem::Ride;
|
||||
session.InteractionType = ViewportInteractionItem::Ride;
|
||||
|
||||
PaintRideEntranceExitLightEffects(session, height, entranceEl);
|
||||
|
||||
@@ -139,7 +139,7 @@ static void PaintRideEntranceExit(paint_session* session, uint8_t direction, int
|
||||
|
||||
if (entranceEl.IsGhost())
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
imageTemplate = ImageId().WithRemap(FilterPaletteID::Palette44);
|
||||
}
|
||||
else if (OpenRCT2::TileInspector::IsElementSelected(reinterpret_cast<const TileElement*>(&entranceEl)))
|
||||
@@ -200,7 +200,7 @@ static void PaintRideEntranceExit(paint_session* session, uint8_t direction, int
|
||||
}
|
||||
|
||||
static void PaintParkEntranceScrollingText(
|
||||
paint_session* session, const EntranceObject& entrance, Direction direction, int32_t height)
|
||||
paint_session& session, const EntranceObject& entrance, Direction direction, int32_t height)
|
||||
{
|
||||
if ((direction + 1) & (1 << 1))
|
||||
return;
|
||||
@@ -241,29 +241,29 @@ static void PaintParkEntranceScrollingText(
|
||||
PaintAddImageAsChild(session, ImageId(imageIndex), { 0, 0, textHeight }, { 28, 28, 47 }, { 2, 2, textHeight });
|
||||
}
|
||||
|
||||
static void PaintParkEntranceLightEffects(paint_session* session)
|
||||
static void PaintParkEntranceLightEffects(paint_session& session)
|
||||
{
|
||||
#ifdef __ENABLE_LIGHTFX__
|
||||
if (lightfx_is_available())
|
||||
{
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session->MapPosition, 0, 0, 155, LightType::Lantern3);
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 0, 0, 155, LightType::Lantern3);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void PaintParkEntrance(paint_session* session, uint8_t direction, int32_t height, const EntranceElement& entranceEl)
|
||||
static void PaintParkEntrance(paint_session& session, uint8_t direction, int32_t height, const EntranceElement& entranceEl)
|
||||
{
|
||||
if (gTrackDesignSaveMode || (session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
if (gTrackDesignSaveMode || (session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
return;
|
||||
|
||||
PaintParkEntranceLightEffects(session);
|
||||
|
||||
session->InteractionType = ViewportInteractionItem::ParkEntrance;
|
||||
session.InteractionType = ViewportInteractionItem::ParkEntrance;
|
||||
|
||||
ImageId imageTemplate;
|
||||
if (entranceEl.IsGhost())
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
imageTemplate = ImageId().WithRemap(FilterPaletteID::Palette44);
|
||||
}
|
||||
else if (OpenRCT2::TileInspector::IsElementSelected(reinterpret_cast<const TileElement*>(&entranceEl)))
|
||||
@@ -322,7 +322,7 @@ static void PaintParkEntrance(paint_session* session, uint8_t direction, int32_t
|
||||
paint_util_set_general_support_height(session, height + 80, 0x20);
|
||||
}
|
||||
|
||||
static void PaintHeightMarkers(paint_session* session, const EntranceElement& entranceEl, int32_t height)
|
||||
static void PaintHeightMarkers(paint_session& session, const EntranceElement& entranceEl, int32_t height)
|
||||
{
|
||||
if (PaintShouldShowHeightMarkers(session, VIEWPORT_FLAG_PATH_HEIGHTS))
|
||||
{
|
||||
@@ -339,9 +339,9 @@ static void PaintHeightMarkers(paint_session* session, const EntranceElement& en
|
||||
}
|
||||
}
|
||||
|
||||
void PaintEntrance(paint_session* session, uint8_t direction, int32_t height, const EntranceElement& entranceElement)
|
||||
void PaintEntrance(paint_session& session, uint8_t direction, int32_t height, const EntranceElement& entranceElement)
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::Label;
|
||||
session.InteractionType = ViewportInteractionItem::Label;
|
||||
|
||||
PaintHeightMarkers(session, entranceElement, height);
|
||||
switch (entranceElement.GetEntranceType())
|
||||
|
||||
@@ -56,7 +56,7 @@ static constexpr const boundbox LargeSceneryBoundBoxes[] = {
|
||||
// clang-format on
|
||||
|
||||
static void PaintLargeScenerySupports(
|
||||
paint_session* session, uint8_t direction, uint16_t height, const LargeSceneryElement& tileElement, ImageId imageTemplate,
|
||||
paint_session& session, uint8_t direction, uint16_t height, const LargeSceneryElement& tileElement, ImageId imageTemplate,
|
||||
const rct_large_scenery_tile& tile)
|
||||
{
|
||||
if (tile.flags & LARGE_SCENERY_TILE_FLAG_NO_SUPPORTS)
|
||||
@@ -106,7 +106,7 @@ static int32_t DivToMinusInfinity(int32_t a, int32_t b)
|
||||
}
|
||||
|
||||
static void PaintLargeScenery3DTextLine(
|
||||
paint_session* session, const LargeSceneryEntry& sceneryEntry, const LargeSceneryText& text, std::string_view line,
|
||||
paint_session& session, const LargeSceneryEntry& sceneryEntry, const LargeSceneryText& text, std::string_view line,
|
||||
ImageId imageTemplate, Direction direction, int32_t offsetY)
|
||||
{
|
||||
line = LargeSceneryCalculateDisplayText(text, line, false);
|
||||
@@ -179,7 +179,7 @@ static bool Is3DTextSingleLine(const LargeSceneryText& text, std::string_view s)
|
||||
}
|
||||
|
||||
static void PaintLargeScenery3DText(
|
||||
paint_session* session, const LargeSceneryEntry& sceneryEntry, const rct_large_scenery_tile& tile,
|
||||
paint_session& session, const LargeSceneryEntry& sceneryEntry, const rct_large_scenery_tile& tile,
|
||||
const LargeSceneryElement& tileElement, uint8_t direction, uint16_t height, bool isGhost)
|
||||
{
|
||||
if (sceneryEntry.tiles[1].x_offset != -1)
|
||||
@@ -191,7 +191,7 @@ static void PaintLargeScenery3DText(
|
||||
}
|
||||
}
|
||||
|
||||
if (session->DPI.zoom_level > ZoomLevel{ 1 })
|
||||
if (session.DPI.zoom_level > ZoomLevel{ 1 })
|
||||
return;
|
||||
|
||||
auto banner = tileElement.GetBanner();
|
||||
@@ -291,7 +291,7 @@ static void PaintLargeScenery3DText(
|
||||
}
|
||||
|
||||
static void PaintLargeSceneryScrollingText(
|
||||
paint_session* session, const LargeSceneryEntry& sceneryEntry, const LargeSceneryElement& tileElement, uint8_t direction,
|
||||
paint_session& session, const LargeSceneryEntry& sceneryEntry, const LargeSceneryElement& tileElement, uint8_t direction,
|
||||
uint16_t height, const CoordsXYZ& bbOffset, bool isGhost)
|
||||
{
|
||||
auto textColour = isGhost ? static_cast<colour_t>(COLOUR_GREY) : tileElement.GetSecondaryColour();
|
||||
@@ -321,9 +321,9 @@ static void PaintLargeSceneryScrollingText(
|
||||
PaintAddImageAsChild(session, imageId, { 0, 0, height + 25 }, { 1, 1, 21 }, bbOffset);
|
||||
}
|
||||
|
||||
void PaintLargeScenery(paint_session* session, uint8_t direction, uint16_t height, const LargeSceneryElement& tileElement)
|
||||
void PaintLargeScenery(paint_session& session, uint8_t direction, uint16_t height, const LargeSceneryElement& tileElement)
|
||||
{
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)
|
||||
return;
|
||||
|
||||
auto sequenceNum = tileElement.GetSequenceIndex();
|
||||
@@ -339,7 +339,7 @@ void PaintLargeScenery(paint_session* session, uint8_t direction, uint16_t heigh
|
||||
if (tile == nullptr)
|
||||
return;
|
||||
|
||||
session->InteractionType = ViewportInteractionItem::LargeScenery;
|
||||
session.InteractionType = ViewportInteractionItem::LargeScenery;
|
||||
|
||||
auto isGhost = false;
|
||||
ImageId imageTemplate;
|
||||
@@ -350,7 +350,7 @@ void PaintLargeScenery(paint_session* session, uint8_t direction, uint16_t heigh
|
||||
}
|
||||
else if (tileElement.IsGhost())
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
imageTemplate = ImageId().WithRemap(FilterPaletteID::Palette44);
|
||||
isGhost = true;
|
||||
}
|
||||
@@ -385,7 +385,7 @@ void PaintLargeScenery(paint_session* session, uint8_t direction, uint16_t heigh
|
||||
{
|
||||
PaintLargeScenery3DText(session, *sceneryEntry, *tile, tileElement, direction, height, isGhost);
|
||||
}
|
||||
else if (session->DPI.zoom_level <= ZoomLevel{ 0 })
|
||||
else if (session.DPI.zoom_level <= ZoomLevel{ 0 })
|
||||
{
|
||||
auto sequenceDirection2 = (tileElement.GetSequenceIndex() - 1) & 3;
|
||||
if (sequenceDirection2 == direction)
|
||||
|
||||
@@ -85,10 +85,10 @@ static constexpr const uint8_t byte_98D8A4[] = {
|
||||
// clang-format on
|
||||
|
||||
void path_paint_box_support(
|
||||
paint_session* session, const PathElement& pathElement, int32_t height, const FootpathPaintInfo& pathPaintInfo,
|
||||
paint_session& session, const PathElement& pathElement, int32_t height, const FootpathPaintInfo& pathPaintInfo,
|
||||
bool hasSupports, ImageId imageTemplate, ImageId sceneryImageTemplate);
|
||||
void path_paint_pole_support(
|
||||
paint_session* session, const PathElement& pathElement, int16_t height, const FootpathPaintInfo& pathPaintInfo,
|
||||
paint_session& session, const PathElement& pathElement, int16_t height, const FootpathPaintInfo& pathPaintInfo,
|
||||
bool hasSupports, ImageId imageTemplate, ImageId sceneryImageTemplate);
|
||||
|
||||
static ImageIndex GetEdgeImageOffset(edge_t edge)
|
||||
@@ -136,7 +136,7 @@ static ImageIndex GetFootpathBenchImage(const PathBitEntry& pathBitEntry, edge_t
|
||||
|
||||
/* rct2: 0x006A5AE5 */
|
||||
static void path_bit_lights_paint(
|
||||
paint_session* session, const PathBitEntry& pathBitEntry, const PathElement& pathElement, int32_t height, uint8_t edges,
|
||||
paint_session& session, const PathBitEntry& pathBitEntry, const PathElement& pathElement, int32_t height, uint8_t edges,
|
||||
ImageId imageTemplate)
|
||||
{
|
||||
if (pathElement.IsSloped())
|
||||
@@ -169,18 +169,18 @@ static void path_bit_lights_paint(
|
||||
}
|
||||
}
|
||||
|
||||
static bool IsBinFull(paint_session* session, const PathElement& pathElement, edge_t edge)
|
||||
static bool IsBinFull(paint_session& session, const PathElement& pathElement, edge_t edge)
|
||||
{
|
||||
switch (edge)
|
||||
{
|
||||
case EDGE_NE:
|
||||
return !(pathElement.GetAdditionStatus() & Numerics::ror8(0x03, (2 * session->CurrentRotation)));
|
||||
return !(pathElement.GetAdditionStatus() & Numerics::ror8(0x03, (2 * session.CurrentRotation)));
|
||||
case EDGE_SE:
|
||||
return !(pathElement.GetAdditionStatus() & Numerics::ror8(0x0C, (2 * session->CurrentRotation)));
|
||||
return !(pathElement.GetAdditionStatus() & Numerics::ror8(0x0C, (2 * session.CurrentRotation)));
|
||||
case EDGE_SW:
|
||||
return !(pathElement.GetAdditionStatus() & Numerics::ror8(0x30, (2 * session->CurrentRotation)));
|
||||
return !(pathElement.GetAdditionStatus() & Numerics::ror8(0x30, (2 * session.CurrentRotation)));
|
||||
case EDGE_NW:
|
||||
return !(pathElement.GetAdditionStatus() & Numerics::ror8(0xC0, (2 * session->CurrentRotation)));
|
||||
return !(pathElement.GetAdditionStatus() & Numerics::ror8(0xC0, (2 * session.CurrentRotation)));
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -188,14 +188,14 @@ static bool IsBinFull(paint_session* session, const PathElement& pathElement, ed
|
||||
|
||||
/* rct2: 0x006A5C94 */
|
||||
static void path_bit_bins_paint(
|
||||
paint_session* session, const PathBitEntry& pathBitEntry, const PathElement& pathElement, int32_t height, uint8_t edges,
|
||||
paint_session& session, const PathBitEntry& pathBitEntry, const PathElement& pathElement, int32_t height, uint8_t edges,
|
||||
ImageId imageTemplate)
|
||||
{
|
||||
if (pathElement.IsSloped())
|
||||
height += 8;
|
||||
|
||||
bool binsAreVandalised = pathElement.IsBroken();
|
||||
auto highlightPathIssues = (session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) != 0;
|
||||
auto highlightPathIssues = (session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) != 0;
|
||||
|
||||
if (!(edges & EDGE_NE))
|
||||
{
|
||||
@@ -235,7 +235,7 @@ static void path_bit_bins_paint(
|
||||
|
||||
/* rct2: 0x006A5E81 */
|
||||
static void path_bit_benches_paint(
|
||||
paint_session* session, const PathBitEntry& pathBitEntry, const PathElement& pathElement, int32_t height, uint8_t edges,
|
||||
paint_session& session, const PathBitEntry& pathBitEntry, const PathElement& pathElement, int32_t height, uint8_t edges,
|
||||
ImageId imageTemplate)
|
||||
{
|
||||
auto isBroken = pathElement.IsBroken();
|
||||
@@ -269,7 +269,7 @@ static void path_bit_benches_paint(
|
||||
|
||||
/* rct2: 0x006A6008 */
|
||||
static void path_bit_jumping_fountains_paint(
|
||||
paint_session* session, const PathBitEntry& pathBitEntry, int32_t height, ImageId imageTemplate, rct_drawpixelinfo* dpi)
|
||||
paint_session& session, const PathBitEntry& pathBitEntry, int32_t height, ImageId imageTemplate, rct_drawpixelinfo* dpi)
|
||||
{
|
||||
if (dpi->zoom_level > ZoomLevel{ 0 })
|
||||
return;
|
||||
@@ -286,7 +286,7 @@ static void path_bit_jumping_fountains_paint(
|
||||
* @param tile_element (esi)
|
||||
*/
|
||||
static void sub_6A4101(
|
||||
paint_session* session, const PathElement& pathElement, uint16_t height, uint32_t connectedEdges, bool hasSupports,
|
||||
paint_session& session, const PathElement& pathElement, uint16_t height, uint32_t connectedEdges, bool hasSupports,
|
||||
const FootpathPaintInfo& pathPaintInfo, ImageId imageTemplate)
|
||||
{
|
||||
auto imageId = imageTemplate.WithIndex(pathPaintInfo.RailingsImageId);
|
||||
@@ -295,7 +295,7 @@ static void sub_6A4101(
|
||||
uint8_t local_ebp = connectedEdges & 0x0F;
|
||||
if (pathElement.IsSloped())
|
||||
{
|
||||
switch ((pathElement.GetSlopeDirection() + session->CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK)
|
||||
switch ((pathElement.GetSlopeDirection() + session.CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK)
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParent(
|
||||
@@ -410,13 +410,13 @@ static void sub_6A4101(
|
||||
|
||||
uint8_t direction = pathElement.GetQueueBannerDirection();
|
||||
// Draw ride sign
|
||||
session->InteractionType = ViewportInteractionItem::Ride;
|
||||
session.InteractionType = ViewportInteractionItem::Ride;
|
||||
if (pathElement.IsSloped())
|
||||
{
|
||||
if (pathElement.GetSlopeDirection() == direction)
|
||||
height += 16;
|
||||
}
|
||||
direction += session->CurrentRotation;
|
||||
direction += session.CurrentRotation;
|
||||
direction &= 3;
|
||||
|
||||
CoordsXYZ boundBoxOffsets = CoordsXYZ(BannerBoundBoxes[direction][0], height + 2);
|
||||
@@ -469,10 +469,10 @@ static void sub_6A4101(
|
||||
1, 1, 21, height + 7, boundBoxOffsets.x, boundBoxOffsets.y, boundBoxOffsets.z);
|
||||
}
|
||||
|
||||
session->InteractionType = ViewportInteractionItem::Footpath;
|
||||
session.InteractionType = ViewportInteractionItem::Footpath;
|
||||
if (imageTemplate.IsRemap())
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -488,7 +488,7 @@ static void sub_6A4101(
|
||||
auto slopeRailingsSupported = !(pathPaintInfo.SurfaceFlags & FOOTPATH_ENTRY_FLAG_NO_SLOPE_RAILINGS);
|
||||
if ((hasSupports || slopeRailingsSupported) && pathElement.IsSloped())
|
||||
{
|
||||
switch ((pathElement.GetSlopeDirection() + session->CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK)
|
||||
switch ((pathElement.GetSlopeDirection() + session.CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK)
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParent(
|
||||
@@ -705,7 +705,7 @@ static void sub_6A4101(
|
||||
* @param sceneryImageFlags (0x00F3EF74)
|
||||
*/
|
||||
static void sub_6A3F61(
|
||||
paint_session* session, const PathElement& pathElement, uint16_t connectedEdges, uint16_t height,
|
||||
paint_session& session, const PathElement& pathElement, uint16_t connectedEdges, uint16_t height,
|
||||
const FootpathPaintInfo& pathPaintInfo, ImageId imageTemplate, ImageId sceneryImageTemplate, bool hasSupports)
|
||||
{
|
||||
// eax --
|
||||
@@ -719,7 +719,7 @@ static void sub_6A3F61(
|
||||
|
||||
// Probably drawing benches etc.
|
||||
|
||||
rct_drawpixelinfo* dpi = &session->DPI;
|
||||
rct_drawpixelinfo* dpi = &session.DPI;
|
||||
|
||||
if (dpi->zoom_level <= ZoomLevel{ 1 })
|
||||
{
|
||||
@@ -729,10 +729,10 @@ static void sub_6A3F61(
|
||||
{
|
||||
if (pathElement.HasAddition())
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::FootpathItem;
|
||||
session.InteractionType = ViewportInteractionItem::FootpathItem;
|
||||
if (sceneryImageTemplate.IsRemap())
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
}
|
||||
|
||||
// Draw additional path bits (bins, benches, lamps, queue screens)
|
||||
@@ -744,7 +744,7 @@ static void sub_6A3F61(
|
||||
paintScenery = false;
|
||||
}
|
||||
else if (
|
||||
(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) && !(pathElement.IsBroken())
|
||||
(session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) && !(pathElement.IsBroken())
|
||||
&& pathAddEntry->draw_type != PathBitDrawType::Bin)
|
||||
{
|
||||
paintScenery = false;
|
||||
@@ -773,11 +773,11 @@ static void sub_6A3F61(
|
||||
break;
|
||||
}
|
||||
|
||||
session->InteractionType = ViewportInteractionItem::Footpath;
|
||||
session.InteractionType = ViewportInteractionItem::Footpath;
|
||||
|
||||
if (sceneryImageTemplate.IsRemap())
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -790,7 +790,7 @@ static void sub_6A3F61(
|
||||
}
|
||||
|
||||
// This is about tunnel drawing
|
||||
uint8_t direction = (pathElement.GetSlopeDirection() + session->CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK;
|
||||
uint8_t direction = (pathElement.GetSlopeDirection() + session.CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK;
|
||||
bool sloped = pathElement.IsSloped();
|
||||
|
||||
if (connectedEdges & EDGE_SE)
|
||||
@@ -861,9 +861,9 @@ static FootpathPaintInfo GetFootpathPaintInfo(const PathElement& pathEl)
|
||||
return pathPaintInfo;
|
||||
}
|
||||
|
||||
static bool ShouldDrawSupports(paint_session* session, const PathElement& pathEl, uint16_t height)
|
||||
static bool ShouldDrawSupports(paint_session& session, const PathElement& pathEl, uint16_t height)
|
||||
{
|
||||
auto surface = map_get_surface_element_at(session->MapPosition);
|
||||
auto surface = map_get_surface_element_at(session.MapPosition);
|
||||
if (surface == nullptr)
|
||||
{
|
||||
return true;
|
||||
@@ -891,7 +891,7 @@ static bool ShouldDrawSupports(paint_session* session, const PathElement& pathEl
|
||||
return false;
|
||||
}
|
||||
|
||||
static void PaintPatrolAreas(paint_session* session, const PathElement& pathEl)
|
||||
static void PaintPatrolAreas(paint_session& session, const PathElement& pathEl)
|
||||
{
|
||||
if (gStaffDrawPatrolAreas != 0xFFFF)
|
||||
{
|
||||
@@ -909,7 +909,7 @@ static void PaintPatrolAreas(paint_session* session, const PathElement& pathEl)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!staff->IsPatrolAreaSet(session->MapPosition))
|
||||
if (!staff->IsPatrolAreaSet(session.MapPosition))
|
||||
{
|
||||
patrolColour = COLOUR_GREY;
|
||||
}
|
||||
@@ -917,13 +917,13 @@ static void PaintPatrolAreas(paint_session* session, const PathElement& pathEl)
|
||||
}
|
||||
}
|
||||
|
||||
if (staff_is_patrol_area_set_for_type(staffType, session->MapPosition))
|
||||
if (staff_is_patrol_area_set_for_type(staffType, session.MapPosition))
|
||||
{
|
||||
uint32_t baseImageIndex = SPR_TERRAIN_STAFF;
|
||||
auto patrolAreaBaseZ = pathEl.GetBaseZ();
|
||||
if (pathEl.IsSloped())
|
||||
{
|
||||
baseImageIndex = SPR_TERRAIN_STAFF_SLOPED + ((pathEl.GetSlopeDirection() + session->CurrentRotation) & 3);
|
||||
baseImageIndex = SPR_TERRAIN_STAFF_SLOPED + ((pathEl.GetSlopeDirection() + session.CurrentRotation) & 3);
|
||||
patrolAreaBaseZ += 16;
|
||||
}
|
||||
|
||||
@@ -933,7 +933,7 @@ static void PaintPatrolAreas(paint_session* session, const PathElement& pathEl)
|
||||
}
|
||||
}
|
||||
|
||||
static void PaintHeightMarkers(paint_session* session, const PathElement& pathEl)
|
||||
static void PaintHeightMarkers(paint_session& session, const PathElement& pathEl)
|
||||
{
|
||||
if (PaintShouldShowHeightMarkers(session, VIEWPORT_FLAG_PATH_HEIGHTS))
|
||||
{
|
||||
@@ -952,7 +952,7 @@ static void PaintHeightMarkers(paint_session* session, const PathElement& pathEl
|
||||
}
|
||||
}
|
||||
|
||||
static void PaintLampLightEffects(paint_session* session, const PathElement& pathEl, uint16_t height)
|
||||
static void PaintLampLightEffects(paint_session& session, const PathElement& pathEl, uint16_t height)
|
||||
{
|
||||
#ifdef __ENABLE_LIGHTFX__
|
||||
if (lightfx_is_available())
|
||||
@@ -964,21 +964,19 @@ static void PaintLampLightEffects(paint_session* session, const PathElement& pat
|
||||
{
|
||||
if (!(pathEl.GetEdges() & EDGE_NE))
|
||||
{
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(
|
||||
session->MapPosition, -16, 0, height + 23, LightType::Lantern3);
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, -16, 0, height + 23, LightType::Lantern3);
|
||||
}
|
||||
if (!(pathEl.GetEdges() & EDGE_SE))
|
||||
{
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session->MapPosition, 0, 16, height + 23, LightType::Lantern3);
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 0, 16, height + 23, LightType::Lantern3);
|
||||
}
|
||||
if (!(pathEl.GetEdges() & EDGE_SW))
|
||||
{
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session->MapPosition, 16, 0, height + 23, LightType::Lantern3);
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 16, 0, height + 23, LightType::Lantern3);
|
||||
}
|
||||
if (!(pathEl.GetEdges() & EDGE_NW))
|
||||
{
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(
|
||||
session->MapPosition, 0, -16, height + 23, LightType::Lantern3);
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 0, -16, height + 23, LightType::Lantern3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -989,9 +987,9 @@ static void PaintLampLightEffects(paint_session* session, const PathElement& pat
|
||||
/**
|
||||
* rct2: 0x0006A3590
|
||||
*/
|
||||
void PaintPath(paint_session* session, uint16_t height, const PathElement& tileElement)
|
||||
void PaintPath(paint_session& session, uint16_t height, const PathElement& tileElement)
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::Footpath;
|
||||
session.InteractionType = ViewportInteractionItem::Footpath;
|
||||
|
||||
ImageId imageTemplate, sceneryImageTemplate;
|
||||
if (gTrackDesignSaveMode)
|
||||
@@ -1008,7 +1006,7 @@ void PaintPath(paint_session* session, uint16_t height, const PathElement& tileE
|
||||
}
|
||||
}
|
||||
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)
|
||||
{
|
||||
imageTemplate = ImageId().WithRemap(FilterPaletteID::Palette46);
|
||||
}
|
||||
@@ -1020,7 +1018,7 @@ void PaintPath(paint_session* session, uint16_t height, const PathElement& tileE
|
||||
|
||||
if (tileElement.IsGhost())
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
imageTemplate = ImageId().WithRemap(FilterPaletteID::Palette44);
|
||||
}
|
||||
else if (TileInspector::IsElementSelected(reinterpret_cast<const TileElement*>(&tileElement)))
|
||||
@@ -1059,15 +1057,15 @@ void PaintPath(paint_session* session, uint16_t height, const PathElement& tileE
|
||||
}
|
||||
|
||||
void path_paint_box_support(
|
||||
paint_session* session, const PathElement& pathElement, int32_t height, const FootpathPaintInfo& pathPaintInfo,
|
||||
paint_session& session, const PathElement& pathElement, int32_t height, const FootpathPaintInfo& pathPaintInfo,
|
||||
bool hasSupports, ImageId imageTemplate, ImageId sceneryImageTemplate)
|
||||
{
|
||||
// Rol edges around rotation
|
||||
uint8_t edges = ((pathElement.GetEdges() << session->CurrentRotation) & 0xF)
|
||||
| (((pathElement.GetEdges()) << session->CurrentRotation) >> 4);
|
||||
uint8_t edges = ((pathElement.GetEdges() << session.CurrentRotation) & 0xF)
|
||||
| (((pathElement.GetEdges()) << session.CurrentRotation) >> 4);
|
||||
|
||||
uint8_t corners = (((pathElement.GetCorners()) << session->CurrentRotation) & 0xF)
|
||||
| (((pathElement.GetCorners()) << session->CurrentRotation) >> 4);
|
||||
uint8_t corners = (((pathElement.GetCorners()) << session.CurrentRotation) & 0xF)
|
||||
| (((pathElement.GetCorners()) << session.CurrentRotation) >> 4);
|
||||
|
||||
CoordsXY boundBoxOffset = { stru_98D804[edges][0], stru_98D804[edges][1] };
|
||||
CoordsXY boundBoxSize = { stru_98D804[edges][2], stru_98D804[edges][3] };
|
||||
@@ -1077,7 +1075,7 @@ void path_paint_box_support(
|
||||
ImageIndex surfaceBaseImageIndex = pathPaintInfo.SurfaceImageId;
|
||||
if (pathElement.IsSloped())
|
||||
{
|
||||
auto directionOffset = (pathElement.GetSlopeDirection() + session->CurrentRotation)
|
||||
auto directionOffset = (pathElement.GetSlopeDirection() + session.CurrentRotation)
|
||||
& FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK;
|
||||
surfaceBaseImageIndex += 16 + directionOffset;
|
||||
}
|
||||
@@ -1086,7 +1084,7 @@ void path_paint_box_support(
|
||||
surfaceBaseImageIndex += byte_98D6E0[edi];
|
||||
}
|
||||
|
||||
if (!session->DidPassSurface)
|
||||
if (!session.DidPassSurface)
|
||||
{
|
||||
boundBoxOffset.x = 3;
|
||||
boundBoxOffset.y = 3;
|
||||
@@ -1099,15 +1097,15 @@ void path_paint_box_support(
|
||||
|
||||
// If we are on the same tile as a straight track, add the offset 2 so we
|
||||
// can clip above gravel part of the track sprite
|
||||
if (session->TrackElementOnSameHeight != nullptr)
|
||||
if (session.TrackElementOnSameHeight != nullptr)
|
||||
{
|
||||
if (session->TrackElementOnSameHeight->AsTrack()->GetTrackType() == TrackElemType::Flat)
|
||||
if (session.TrackElementOnSameHeight->AsTrack()->GetTrackType() == TrackElemType::Flat)
|
||||
{
|
||||
boundingBoxZOffset = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasSupports || !session->DidPassSurface)
|
||||
if (!hasSupports || !session.DidPassSurface)
|
||||
{
|
||||
PaintAddImageAsParent(
|
||||
session, imageTemplate.WithIndex(surfaceBaseImageIndex), { 0, 0, height }, { boundBoxSize, 0 },
|
||||
@@ -1119,7 +1117,7 @@ void path_paint_box_support(
|
||||
if (pathElement.IsSloped())
|
||||
{
|
||||
auto directionOffset
|
||||
= ((pathElement.GetSlopeDirection() + session->CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK);
|
||||
= ((pathElement.GetSlopeDirection() + session.CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK);
|
||||
bridgeBaseImageIndex = pathPaintInfo.BridgeImageId + 51 + directionOffset;
|
||||
}
|
||||
else
|
||||
@@ -1144,7 +1142,7 @@ void path_paint_box_support(
|
||||
uint16_t ax = 0;
|
||||
if (pathElement.IsSloped())
|
||||
{
|
||||
ax = ((pathElement.GetSlopeDirection() + session->CurrentRotation) & 0x3) + 1;
|
||||
ax = ((pathElement.GetSlopeDirection() + session.CurrentRotation) & 0x3) + 1;
|
||||
}
|
||||
|
||||
auto supportType = byte_98D8A4[edges] == 0 ? 0 : 1;
|
||||
@@ -1194,19 +1192,19 @@ void path_paint_box_support(
|
||||
}
|
||||
|
||||
void path_paint_pole_support(
|
||||
paint_session* session, const PathElement& pathElement, int16_t height, const FootpathPaintInfo& pathPaintInfo,
|
||||
paint_session& session, const PathElement& pathElement, int16_t height, const FootpathPaintInfo& pathPaintInfo,
|
||||
bool hasSupports, ImageId imageTemplate, ImageId sceneryImageTemplate)
|
||||
{
|
||||
// Rol edges around rotation
|
||||
uint8_t edges = ((pathElement.GetEdges() << session->CurrentRotation) & 0xF)
|
||||
| (((pathElement.GetEdges()) << session->CurrentRotation) >> 4);
|
||||
uint8_t edges = ((pathElement.GetEdges() << session.CurrentRotation) & 0xF)
|
||||
| (((pathElement.GetEdges()) << session.CurrentRotation) >> 4);
|
||||
|
||||
CoordsXY boundBoxOffset = { stru_98D804[edges][0], stru_98D804[edges][1] };
|
||||
|
||||
CoordsXY boundBoxSize = { stru_98D804[edges][2], stru_98D804[edges][3] };
|
||||
|
||||
uint8_t corners = (((pathElement.GetCorners()) << session->CurrentRotation) & 0xF)
|
||||
| (((pathElement.GetCorners()) << session->CurrentRotation) >> 4);
|
||||
uint8_t corners = (((pathElement.GetCorners()) << session.CurrentRotation) & 0xF)
|
||||
| (((pathElement.GetCorners()) << session.CurrentRotation) >> 4);
|
||||
|
||||
uint16_t edi = edges | (corners << 4);
|
||||
|
||||
@@ -1214,7 +1212,7 @@ void path_paint_pole_support(
|
||||
if (pathElement.IsSloped())
|
||||
{
|
||||
auto directionOffset
|
||||
= ((pathElement.GetSlopeDirection() + session->CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK);
|
||||
= ((pathElement.GetSlopeDirection() + session.CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK);
|
||||
surfaceBaseImageIndex += 16 + directionOffset;
|
||||
}
|
||||
else
|
||||
@@ -1223,7 +1221,7 @@ void path_paint_pole_support(
|
||||
}
|
||||
|
||||
// Below Surface
|
||||
if (!session->DidPassSurface)
|
||||
if (!session.DidPassSurface)
|
||||
{
|
||||
boundBoxOffset.x = 3;
|
||||
boundBoxOffset.y = 3;
|
||||
@@ -1236,15 +1234,15 @@ void path_paint_pole_support(
|
||||
|
||||
// If we are on the same tile as a straight track, add the offset 2 so we
|
||||
// can clip above gravel part of the track sprite
|
||||
if (session->TrackElementOnSameHeight != nullptr)
|
||||
if (session.TrackElementOnSameHeight != nullptr)
|
||||
{
|
||||
if (session->TrackElementOnSameHeight->AsTrack()->GetTrackType() == TrackElemType::Flat)
|
||||
if (session.TrackElementOnSameHeight->AsTrack()->GetTrackType() == TrackElemType::Flat)
|
||||
{
|
||||
boundingBoxZOffset = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasSupports || !session->DidPassSurface)
|
||||
if (!hasSupports || !session.DidPassSurface)
|
||||
{
|
||||
PaintAddImageAsParent(
|
||||
session, imageTemplate.WithIndex(surfaceBaseImageIndex), { 0, 0, height }, { boundBoxSize.x, boundBoxSize.y, 0 },
|
||||
@@ -1255,7 +1253,7 @@ void path_paint_pole_support(
|
||||
ImageIndex bridgeBaseImageIndex;
|
||||
if (pathElement.IsSloped())
|
||||
{
|
||||
bridgeBaseImageIndex = ((pathElement.GetSlopeDirection() + session->CurrentRotation)
|
||||
bridgeBaseImageIndex = ((pathElement.GetSlopeDirection() + session.CurrentRotation)
|
||||
& FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK)
|
||||
+ pathPaintInfo.BridgeImageId + 16;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ static constexpr const CoordsXY lengths[] = {
|
||||
};
|
||||
|
||||
static void PaintSmallScenerySupports(
|
||||
paint_session* session, const SmallSceneryEntry& sceneryEntry, const SmallSceneryElement& sceneryElement,
|
||||
paint_session& session, const SmallSceneryEntry& sceneryEntry, const SmallSceneryElement& sceneryElement,
|
||||
Direction direction, int32_t height, ImageId imageTemplate)
|
||||
{
|
||||
if (!sceneryElement.NeedsSupports())
|
||||
@@ -62,7 +62,7 @@ static void PaintSmallScenerySupports(
|
||||
}
|
||||
|
||||
static void SetSupportHeights(
|
||||
paint_session* session, const SmallSceneryEntry& sceneryEntry, const SmallSceneryElement& sceneryElement, int32_t height)
|
||||
paint_session& session, const SmallSceneryEntry& sceneryEntry, const SmallSceneryElement& sceneryElement, int32_t height)
|
||||
{
|
||||
height += sceneryEntry.height;
|
||||
|
||||
@@ -79,7 +79,7 @@ static void SetSupportHeights(
|
||||
}
|
||||
else if (sceneryEntry.HasFlag(SMALL_SCENERY_FLAG_VOFFSET_CENTRE))
|
||||
{
|
||||
auto direction = (sceneryElement.GetSceneryQuadrant() + session->CurrentRotation) % 4;
|
||||
auto direction = (sceneryElement.GetSceneryQuadrant() + session.CurrentRotation) % 4;
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C8 | SEGMENT_CC, direction), height, 0x20);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ static void SetSupportHeights(
|
||||
}
|
||||
else if (sceneryEntry.HasFlag(SMALL_SCENERY_FLAG_VOFFSET_CENTRE))
|
||||
{
|
||||
auto direction = (sceneryElement.GetSceneryQuadrant() + session->CurrentRotation) % 4;
|
||||
auto direction = (sceneryElement.GetSceneryQuadrant() + session.CurrentRotation) % 4;
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0);
|
||||
}
|
||||
@@ -104,9 +104,9 @@ static void SetSupportHeights(
|
||||
*
|
||||
* rct2: 0x006DFF47
|
||||
*/
|
||||
void PaintSmallScenery(paint_session* session, uint8_t direction, int32_t height, const SmallSceneryElement& sceneryElement)
|
||||
void PaintSmallScenery(paint_session& session, uint8_t direction, int32_t height, const SmallSceneryElement& sceneryElement)
|
||||
{
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ void PaintSmallScenery(paint_session* session, uint8_t direction, int32_t height
|
||||
return;
|
||||
}
|
||||
|
||||
session->InteractionType = ViewportInteractionItem::Scenery;
|
||||
session.InteractionType = ViewportInteractionItem::Scenery;
|
||||
CoordsXYZ boxLength;
|
||||
CoordsXYZ boxOffset{ 0, 0, height };
|
||||
ImageId imageTemplate;
|
||||
@@ -130,7 +130,7 @@ void PaintSmallScenery(paint_session* session, uint8_t direction, int32_t height
|
||||
}
|
||||
if (sceneryElement.IsGhost())
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
imageTemplate = ImageId().WithRemap(FilterPaletteID::Palette44);
|
||||
}
|
||||
else if (OpenRCT2::TileInspector::IsElementSelected(reinterpret_cast<const TileElement*>(&sceneryElement)))
|
||||
@@ -183,7 +183,7 @@ void PaintSmallScenery(paint_session* session, uint8_t direction, int32_t height
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t quadrant = (sceneryElement.GetSceneryQuadrant() + session->CurrentRotation) & 3;
|
||||
uint8_t quadrant = (sceneryElement.GetSceneryQuadrant() + session.CurrentRotation) & 3;
|
||||
offset.x = SceneryQuadrantOffsets[quadrant].x;
|
||||
offset.y = SceneryQuadrantOffsets[quadrant].y;
|
||||
boxOffset.x = offset.x;
|
||||
@@ -230,7 +230,7 @@ void PaintSmallScenery(paint_session* session, uint8_t direction, int32_t height
|
||||
|
||||
if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_ANIMATED))
|
||||
{
|
||||
if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_VISIBLE_WHEN_ZOOMED) || (session->DPI.zoom_level <= ZoomLevel{ 1 }))
|
||||
if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_VISIBLE_WHEN_ZOOMED) || (session.DPI.zoom_level <= ZoomLevel{ 1 }))
|
||||
{
|
||||
if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_FOUNTAIN_SPRAY_1))
|
||||
{
|
||||
@@ -282,8 +282,8 @@ void PaintSmallScenery(paint_session* session, uint8_t direction, int32_t height
|
||||
else if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_SWAMP_GOO))
|
||||
{
|
||||
auto imageIndex = gCurrentTicks;
|
||||
imageIndex += session->SpritePosition.x / 4;
|
||||
imageIndex += session->SpritePosition.y / 4;
|
||||
imageIndex += session.SpritePosition.x / 4;
|
||||
imageIndex += session.SpritePosition.y / 4;
|
||||
imageIndex = sceneryEntry->image + ((imageIndex / 4) % 16);
|
||||
PaintAddImageAsChild(session, imageTemplate.WithIndex(imageIndex), offset, boxLength, boxOffset);
|
||||
}
|
||||
@@ -293,7 +293,7 @@ void PaintSmallScenery(paint_session* session, uint8_t direction, int32_t height
|
||||
auto frame = gCurrentTicks;
|
||||
if (!(sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_COG)))
|
||||
{
|
||||
frame += ((session->SpritePosition.x / 4) + (session->SpritePosition.y / 4));
|
||||
frame += ((session.SpritePosition.x / 4) + (session.SpritePosition.y / 4));
|
||||
frame += sceneryElement.GetSceneryQuadrant() << 2;
|
||||
}
|
||||
frame = (frame >> delay) & sceneryEntry->animation_mask;
|
||||
|
||||
@@ -314,7 +314,7 @@ static const TerrainSurfaceObject* get_surface_object(size_t index)
|
||||
}
|
||||
|
||||
static ImageId get_surface_image(
|
||||
const paint_session* session, ObjectEntryIndex index, int32_t offset, uint8_t rotation, int32_t grassLength, bool grid,
|
||||
const paint_session& session, ObjectEntryIndex index, int32_t offset, uint8_t rotation, int32_t grassLength, bool grid,
|
||||
bool underground)
|
||||
{
|
||||
ImageId image;
|
||||
@@ -322,7 +322,7 @@ static ImageId get_surface_image(
|
||||
if (obj != nullptr)
|
||||
{
|
||||
image = ImageId(obj->GetImageId(
|
||||
{ session->MapPosition.x >> 5, session->MapPosition.y >> 5 }, grassLength, rotation, offset, grid, underground));
|
||||
{ session.MapPosition.x >> 5, session.MapPosition.y >> 5 }, grassLength, rotation, offset, grid, underground));
|
||||
if (obj->Colour != 255)
|
||||
{
|
||||
image = image.WithPrimary(obj->Colour);
|
||||
@@ -434,7 +434,7 @@ static uint8_t viewport_surface_paint_setup_get_relative_slope(const SurfaceElem
|
||||
* rct2: 0x0065E890, 0x0065E946, 0x0065E9FC, 0x0065EAB2
|
||||
*/
|
||||
static void viewport_surface_smoothen_edge(
|
||||
paint_session* session, enum edge_t edge, struct tile_descriptor self, struct tile_descriptor neighbour)
|
||||
paint_session& session, enum edge_t edge, struct tile_descriptor self, struct tile_descriptor neighbour)
|
||||
{
|
||||
if (neighbour.tile_element == nullptr)
|
||||
return;
|
||||
@@ -527,7 +527,7 @@ static void viewport_surface_smoothen_edge(
|
||||
|
||||
if (PaintAttachToPreviousPS(session, image_id, 0, 0))
|
||||
{
|
||||
attached_paint_struct* out = session->LastAttachedPS;
|
||||
attached_paint_struct* out = session.LastAttachedPS;
|
||||
// set content and enable masking
|
||||
out->colour_image_id = get_surface_pattern(neighbour.terrain, cl);
|
||||
out->flags |= PAINT_STRUCT_FLAG_IS_MASKED;
|
||||
@@ -552,7 +552,7 @@ static bool tile_is_inside_clip_view(const tile_descriptor& tile)
|
||||
}
|
||||
|
||||
static void viewport_surface_draw_tile_side_bottom(
|
||||
paint_session* session, enum edge_t edge, uint16_t height, uint8_t edgeStyle, struct tile_descriptor self,
|
||||
paint_session& session, enum edge_t edge, uint16_t height, uint8_t edgeStyle, struct tile_descriptor self,
|
||||
struct tile_descriptor neighbour, bool isWater)
|
||||
{
|
||||
// From big Z to tiny Z
|
||||
@@ -579,7 +579,7 @@ static void viewport_surface_draw_tile_side_bottom(
|
||||
tunnelBounds.x = 32;
|
||||
tunnelTopBoundBoxOffset.y = 31;
|
||||
|
||||
tunnelArray = session->LeftTunnels;
|
||||
tunnelArray = session.LeftTunnels;
|
||||
break;
|
||||
|
||||
case EDGE_BOTTOMRIGHT:
|
||||
@@ -594,14 +594,14 @@ static void viewport_surface_draw_tile_side_bottom(
|
||||
tunnelBounds.y = 32;
|
||||
tunnelTopBoundBoxOffset.x = 31;
|
||||
|
||||
tunnelArray = session->RightTunnels;
|
||||
tunnelArray = session.RightTunnels;
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
bool neighbourIsClippedAway = (session->ViewFlags & VIEWPORT_FLAG_CLIP_VIEW) && !tile_is_inside_clip_view(neighbour);
|
||||
bool neighbourIsClippedAway = (session.ViewFlags & VIEWPORT_FLAG_CLIP_VIEW) && !tile_is_inside_clip_view(neighbour);
|
||||
|
||||
if (neighbour.tile_element == nullptr || neighbourIsClippedAway)
|
||||
{
|
||||
@@ -630,7 +630,7 @@ static void viewport_surface_draw_tile_side_bottom(
|
||||
}
|
||||
|
||||
auto baseImageId = get_edge_image(edgeStyle, 0);
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE)
|
||||
{
|
||||
baseImageId = get_edge_image(edgeStyle, 1);
|
||||
}
|
||||
@@ -749,7 +749,7 @@ static void viewport_surface_draw_tile_side_bottom(
|
||||
* rct2: 0x0065EB7D, 0x0065F0D8
|
||||
*/
|
||||
static void viewport_surface_draw_land_side_bottom(
|
||||
paint_session* session, enum edge_t edge, uint16_t height, uint8_t edgeStyle, struct tile_descriptor self,
|
||||
paint_session& session, enum edge_t edge, uint16_t height, uint8_t edgeStyle, struct tile_descriptor self,
|
||||
struct tile_descriptor neighbour)
|
||||
{
|
||||
viewport_surface_draw_tile_side_bottom(session, edge, height, edgeStyle, self, neighbour, false);
|
||||
@@ -759,14 +759,14 @@ static void viewport_surface_draw_land_side_bottom(
|
||||
* rct2: 0x0065F8B9, 0x0065FE26
|
||||
*/
|
||||
static void viewport_surface_draw_water_side_bottom(
|
||||
paint_session* session, enum edge_t edge, uint16_t height, uint8_t edgeStyle, struct tile_descriptor self,
|
||||
paint_session& session, enum edge_t edge, uint16_t height, uint8_t edgeStyle, struct tile_descriptor self,
|
||||
struct tile_descriptor neighbour)
|
||||
{
|
||||
viewport_surface_draw_tile_side_bottom(session, edge, height, edgeStyle, self, neighbour, true);
|
||||
}
|
||||
|
||||
static void viewport_surface_draw_tile_side_top(
|
||||
paint_session* session, enum edge_t edge, uint16_t height, uint8_t terrain, struct tile_descriptor self,
|
||||
paint_session& session, enum edge_t edge, uint16_t height, uint8_t terrain, struct tile_descriptor self,
|
||||
struct tile_descriptor neighbour, bool isWater)
|
||||
{
|
||||
// From big Z to tiny Z
|
||||
@@ -835,7 +835,7 @@ static void viewport_surface_draw_tile_side_top(
|
||||
if (isWater)
|
||||
{
|
||||
baseImageId = get_edge_image(terrain, 2); // var_08
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE)
|
||||
{
|
||||
baseImageId = get_edge_image(terrain, 1); // var_04
|
||||
}
|
||||
@@ -843,7 +843,7 @@ static void viewport_surface_draw_tile_side_top(
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(session->ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE))
|
||||
if (!(session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE))
|
||||
{
|
||||
const uint8_t incline = (cornerHeight2 - cornerHeight1) + 1;
|
||||
const auto imageId = get_edge_image(terrain, 3).WithIndexOffset((edge == EDGE_TOPLEFT ? 3 : 0) + incline);
|
||||
@@ -906,7 +906,7 @@ static void viewport_surface_draw_tile_side_top(
|
||||
* rct2: 0x0065F63B, 0x0065F77D
|
||||
*/
|
||||
static void viewport_surface_draw_land_side_top(
|
||||
paint_session* session, enum edge_t edge, uint16_t height, uint8_t terrain, struct tile_descriptor self,
|
||||
paint_session& session, enum edge_t edge, uint16_t height, uint8_t terrain, struct tile_descriptor self,
|
||||
struct tile_descriptor neighbour)
|
||||
{
|
||||
viewport_surface_draw_tile_side_top(session, edge, height, terrain, self, neighbour, false);
|
||||
@@ -916,7 +916,7 @@ static void viewport_surface_draw_land_side_top(
|
||||
* rct2: 0x0066039B, 0x006604F1
|
||||
*/
|
||||
static void viewport_surface_draw_water_side_top(
|
||||
paint_session* session, enum edge_t edge, uint16_t height, uint8_t terrain, struct tile_descriptor self,
|
||||
paint_session& session, enum edge_t edge, uint16_t height, uint8_t terrain, struct tile_descriptor self,
|
||||
struct tile_descriptor neighbour)
|
||||
{
|
||||
viewport_surface_draw_tile_side_top(session, edge, height, terrain, self, neighbour, true);
|
||||
@@ -953,18 +953,18 @@ static std::pair<int32_t, int32_t> surface_get_height_above_water(
|
||||
/**
|
||||
* rct2: 0x0066062C
|
||||
*/
|
||||
void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, const SurfaceElement& tileElement)
|
||||
void PaintSurface(paint_session& session, uint8_t direction, uint16_t height, const SurfaceElement& tileElement)
|
||||
{
|
||||
rct_drawpixelinfo* dpi = &session->DPI;
|
||||
session->InteractionType = ViewportInteractionItem::Terrain;
|
||||
session->DidPassSurface = true;
|
||||
session->SurfaceElement = reinterpret_cast<const TileElement*>(&tileElement);
|
||||
rct_drawpixelinfo* dpi = &session.DPI;
|
||||
session.InteractionType = ViewportInteractionItem::Terrain;
|
||||
session.DidPassSurface = true;
|
||||
session.SurfaceElement = reinterpret_cast<const TileElement*>(&tileElement);
|
||||
|
||||
const auto zoomLevel = dpi->zoom_level;
|
||||
const uint8_t rotation = session->CurrentRotation;
|
||||
const uint8_t rotation = session.CurrentRotation;
|
||||
const auto terrain_type = tileElement.GetSurfaceStyle();
|
||||
const uint8_t surfaceShape = viewport_surface_paint_setup_get_relative_slope(tileElement, rotation);
|
||||
const CoordsXY& base = session->SpritePosition;
|
||||
const CoordsXY& base = session.SpritePosition;
|
||||
const corner_height& cornerHeights = corner_heights[surfaceShape];
|
||||
const TileElement* elementPtr = &reinterpret_cast<const TileElement&>(tileElement);
|
||||
|
||||
@@ -1019,8 +1019,8 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
|
||||
if (PaintShouldShowHeightMarkers(session, VIEWPORT_FLAG_LAND_HEIGHTS))
|
||||
{
|
||||
const int16_t x = session->MapPosition.x;
|
||||
const int16_t y = session->MapPosition.y;
|
||||
const int16_t x = session.MapPosition.x;
|
||||
const int16_t y = session.MapPosition.y;
|
||||
|
||||
int32_t dx = tile_element_height({ x + 16, y + 16 });
|
||||
dx += 3;
|
||||
@@ -1033,7 +1033,7 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
}
|
||||
|
||||
bool has_surface = false;
|
||||
if (session->VerticalTunnelHeight * COORDS_Z_PER_TINY_Z == height)
|
||||
if (session.VerticalTunnelHeight * COORDS_Z_PER_TINY_Z == height)
|
||||
{
|
||||
// Vertical tunnels
|
||||
PaintAddImageAsParent(session, 1575, { 0, 0, height }, { 1, 30, 39 }, { -2, 1, height - 40 });
|
||||
@@ -1043,12 +1043,12 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
}
|
||||
else
|
||||
{
|
||||
const bool showGridlines = (session->ViewFlags & VIEWPORT_FLAG_GRIDLINES);
|
||||
const bool showGridlines = (session.ViewFlags & VIEWPORT_FLAG_GRIDLINES);
|
||||
|
||||
auto grassLength = -1;
|
||||
if (zoomLevel <= ZoomLevel{ 0 })
|
||||
{
|
||||
if ((session->ViewFlags & (VIEWPORT_FLAG_HIDE_BASE | VIEWPORT_FLAG_UNDERGROUND_INSIDE)) == 0)
|
||||
if ((session.ViewFlags & (VIEWPORT_FLAG_HIDE_BASE | VIEWPORT_FLAG_UNDERGROUND_INSIDE)) == 0)
|
||||
{
|
||||
grassLength = tileElement.GetGrassLength() & 0x7;
|
||||
}
|
||||
@@ -1066,7 +1066,7 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
{
|
||||
imageId = get_surface_image(session, terrain_type, image_offset, rotation, grassLength, showGridlines, false);
|
||||
}
|
||||
if (session->ViewFlags & (VIEWPORT_FLAG_UNDERGROUND_INSIDE | VIEWPORT_FLAG_HIDE_BASE))
|
||||
if (session.ViewFlags & (VIEWPORT_FLAG_UNDERGROUND_INSIDE | VIEWPORT_FLAG_HIDE_BASE))
|
||||
{
|
||||
imageId = imageId.WithTransparancy(FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
@@ -1086,7 +1086,7 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
{
|
||||
const int32_t staffIndex = gStaffDrawPatrolAreas;
|
||||
const bool is_staff_list = staffIndex & 0x8000;
|
||||
const int16_t x = session->MapPosition.x, y = session->MapPosition.y;
|
||||
const int16_t x = session.MapPosition.x, y = session.MapPosition.y;
|
||||
|
||||
uint8_t staffType = staffIndex & 0x7FFF;
|
||||
uint32_t image_id = IMAGE_TYPE_REMAP;
|
||||
@@ -1109,7 +1109,7 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
}
|
||||
}
|
||||
|
||||
if (staff_is_patrol_area_set_for_type(static_cast<StaffType>(staffType), session->MapPosition))
|
||||
if (staff_is_patrol_area_set_for_type(static_cast<StaffType>(staffType), session.MapPosition))
|
||||
{
|
||||
assert(surfaceShape < std::size(byte_97B444));
|
||||
|
||||
@@ -1117,17 +1117,17 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
image_id |= SPR_TERRAIN_SELECTION_PATROL_AREA + byte_97B444[local_surfaceShape];
|
||||
image_id |= patrolColour << 19;
|
||||
|
||||
paint_struct* backup = session->LastPS;
|
||||
paint_struct* backup = session.LastPS;
|
||||
PaintAddImageAsParent(session, image_id, { 0, 0, local_height }, { 32, 32, 1 });
|
||||
session->LastPS = backup;
|
||||
session.LastPS = backup;
|
||||
}
|
||||
}
|
||||
|
||||
// Draw Peep Spawns
|
||||
if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode)
|
||||
&& session->ViewFlags & VIEWPORT_FLAG_LAND_OWNERSHIP)
|
||||
&& session.ViewFlags & VIEWPORT_FLAG_LAND_OWNERSHIP)
|
||||
{
|
||||
const CoordsXY& pos = session->MapPosition;
|
||||
const CoordsXY& pos = session.MapPosition;
|
||||
for (auto& spawn : gPeepSpawns)
|
||||
{
|
||||
if ((spawn.x & 0xFFE0) == pos.x && (spawn.y & 0xFFE0) == pos.y)
|
||||
@@ -1141,7 +1141,7 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
}
|
||||
}
|
||||
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_LAND_OWNERSHIP)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_LAND_OWNERSHIP)
|
||||
{
|
||||
// loc_660E9A:
|
||||
if (tileElement.GetOwnership() & OWNERSHIP_OWNED)
|
||||
@@ -1151,15 +1151,15 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
}
|
||||
else if (tileElement.GetOwnership() & OWNERSHIP_AVAILABLE)
|
||||
{
|
||||
const CoordsXY& pos = session->MapPosition;
|
||||
const CoordsXY& pos = session.MapPosition;
|
||||
const int32_t height2 = (tile_element_height({ pos.x + 16, pos.y + 16 })) + 3;
|
||||
paint_struct* backup = session->LastPS;
|
||||
paint_struct* backup = session.LastPS;
|
||||
PaintAddImageAsParent(session, SPR_LAND_OWNERSHIP_AVAILABLE, { 16, 16, height2 }, { 1, 1, 0 });
|
||||
session->LastPS = backup;
|
||||
session.LastPS = backup;
|
||||
}
|
||||
}
|
||||
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_CONSTRUCTION_RIGHTS && !(tileElement.GetOwnership() & OWNERSHIP_OWNED))
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_CONSTRUCTION_RIGHTS && !(tileElement.GetOwnership() & OWNERSHIP_OWNED))
|
||||
{
|
||||
if (tileElement.GetOwnership() & OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED)
|
||||
{
|
||||
@@ -1168,11 +1168,11 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
}
|
||||
else if (tileElement.GetOwnership() & OWNERSHIP_CONSTRUCTION_RIGHTS_AVAILABLE)
|
||||
{
|
||||
const CoordsXY& pos = session->MapPosition;
|
||||
const CoordsXY& pos = session.MapPosition;
|
||||
const int32_t height2 = tile_element_height({ pos.x + 16, pos.y + 16 });
|
||||
paint_struct* backup = session->LastPS;
|
||||
paint_struct* backup = session.LastPS;
|
||||
PaintAddImageAsParent(session, SPR_LAND_CONSTRUCTION_RIGHTS_AVAILABLE, { 16, 16, height2 + 3 }, { 1, 1, 0 });
|
||||
session->LastPS = backup;
|
||||
session.LastPS = backup;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1183,7 +1183,7 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)
|
||||
{
|
||||
// loc_660FB8:
|
||||
const CoordsXY& pos = session->MapPosition;
|
||||
const CoordsXY& pos = session.MapPosition;
|
||||
if (pos.x >= gMapSelectPositionA.x && pos.x <= gMapSelectPositionB.x && pos.y >= gMapSelectPositionA.y
|
||||
&& pos.y <= gMapSelectPositionB.y)
|
||||
{
|
||||
@@ -1224,16 +1224,16 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
|
||||
const int32_t image_id = (SPR_TERRAIN_SELECTION_CORNER + byte_97B444[local_surfaceShape]) | 0x21300000;
|
||||
|
||||
paint_struct* backup = session->LastPS;
|
||||
paint_struct* backup = session.LastPS;
|
||||
PaintAddImageAsParent(session, image_id, { 0, 0, local_height }, { 32, 32, 1 });
|
||||
session->LastPS = backup;
|
||||
session.LastPS = backup;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE_CONSTRUCT)
|
||||
{
|
||||
const CoordsXY& pos = session->MapPosition;
|
||||
const CoordsXY& pos = session.MapPosition;
|
||||
|
||||
for (const auto& tile : gMapSelectionTiles)
|
||||
{
|
||||
@@ -1254,8 +1254,8 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
}
|
||||
}
|
||||
|
||||
if (zoomLevel <= ZoomLevel{ 0 } && has_surface && !(session->ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE)
|
||||
&& !(session->ViewFlags & VIEWPORT_FLAG_HIDE_BASE) && gConfigGeneral.landscape_smoothing)
|
||||
if (zoomLevel <= ZoomLevel{ 0 } && has_surface && !(session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE)
|
||||
&& !(session.ViewFlags & VIEWPORT_FLAG_HIDE_BASE) && gConfigGeneral.landscape_smoothing)
|
||||
{
|
||||
viewport_surface_smoothen_edge(session, EDGE_TOPLEFT, tileDescriptors[0], tileDescriptors[3]);
|
||||
viewport_surface_smoothen_edge(session, EDGE_TOPRIGHT, tileDescriptors[0], tileDescriptors[4]);
|
||||
@@ -1263,7 +1263,7 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
viewport_surface_smoothen_edge(session, EDGE_BOTTOMRIGHT, tileDescriptors[0], tileDescriptors[2]);
|
||||
}
|
||||
|
||||
if ((session->ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE) && !(session->ViewFlags & VIEWPORT_FLAG_HIDE_BASE)
|
||||
if ((session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE) && !(session.ViewFlags & VIEWPORT_FLAG_HIDE_BASE)
|
||||
&& !(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
|
||||
{
|
||||
const uint8_t image_offset = byte_97B444[surfaceShape];
|
||||
@@ -1271,7 +1271,7 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
PaintAttachToPreviousPS(session, imageId, 0, 0);
|
||||
}
|
||||
|
||||
if (!(session->ViewFlags & VIEWPORT_FLAG_HIDE_VERTICAL))
|
||||
if (!(session.ViewFlags & VIEWPORT_FLAG_HIDE_VERTICAL))
|
||||
{
|
||||
const auto edgeStyle = tileElement.GetEdgeStyle();
|
||||
if (static_cast<int32_t>(edgeStyle) >= object_entry_group_counts[EnumValue(ObjectType::TerrainEdge)])
|
||||
@@ -1288,16 +1288,16 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
}
|
||||
|
||||
const uint16_t waterHeight = tileElement.GetWaterHeight();
|
||||
const bool waterGetsClipped = (session->ViewFlags & VIEWPORT_FLAG_CLIP_VIEW) && (waterHeight > gClipHeight * COORDS_Z_STEP);
|
||||
const bool waterGetsClipped = (session.ViewFlags & VIEWPORT_FLAG_CLIP_VIEW) && (waterHeight > gClipHeight * COORDS_Z_STEP);
|
||||
|
||||
if (waterHeight > 0 && !gTrackDesignSaveMode && !waterGetsClipped)
|
||||
{
|
||||
// loc_6615A9: (water height)
|
||||
session->InteractionType = ViewportInteractionItem::Water;
|
||||
session.InteractionType = ViewportInteractionItem::Water;
|
||||
|
||||
const uint16_t localHeight = height + 16;
|
||||
|
||||
session->WaterHeight = waterHeight;
|
||||
session.WaterHeight = waterHeight;
|
||||
|
||||
int32_t image_offset = 0;
|
||||
if (waterHeight <= localHeight)
|
||||
@@ -1309,11 +1309,11 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
| EnumValue(FilterPaletteID::PaletteWater) << 19;
|
||||
PaintAddImageAsParent(session, image_id, { 0, 0, waterHeight }, { 32, 32, -1 });
|
||||
|
||||
const bool transparent = gConfigGeneral.transparent_water || (session->ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE);
|
||||
const bool transparent = gConfigGeneral.transparent_water || (session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE);
|
||||
const uint32_t overlayStart = transparent ? SPR_WATER_OVERLAY : SPR_RCT1_WATER_OVERLAY;
|
||||
PaintAttachToPreviousPS(session, overlayStart + image_offset, 0, 0);
|
||||
|
||||
if (!(session->ViewFlags & VIEWPORT_FLAG_HIDE_VERTICAL))
|
||||
if (!(session.ViewFlags & VIEWPORT_FLAG_HIDE_VERTICAL))
|
||||
{
|
||||
// This wasn't in the original, but the code depended on globals that were only set in a different conditional
|
||||
const uint32_t edgeStyle = tileElement.GetEdgeStyle();
|
||||
@@ -1333,7 +1333,7 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
if ((tileElement.GetParkFences()) && !gTrackDesignSaveMode)
|
||||
{
|
||||
// Owned land boundary fences
|
||||
session->InteractionType = ViewportInteractionItem::ParkEntrance;
|
||||
session.InteractionType = ViewportInteractionItem::ParkEntrance;
|
||||
|
||||
uint8_t rotatedFences = Numerics::rol4(tileElement.GetParkFences(), rotation);
|
||||
|
||||
@@ -1391,8 +1391,8 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
|
||||
}
|
||||
}
|
||||
|
||||
session->InteractionType = ViewportInteractionItem::Terrain;
|
||||
session->Unk141E9DB |= PaintSessionFlags::IsPassedSurface;
|
||||
session.InteractionType = ViewportInteractionItem::Terrain;
|
||||
session.Unk141E9DB |= PaintSessionFlags::IsPassedSurface;
|
||||
|
||||
switch (surfaceShape)
|
||||
{
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
uint16_t testPaintVerticalTunnelHeight;
|
||||
#endif
|
||||
|
||||
static void blank_tiles_paint(paint_session* session, int32_t x, int32_t y);
|
||||
static void sub_68B3FB(paint_session* session, int32_t x, int32_t y);
|
||||
static void blank_tiles_paint(paint_session& session, int32_t x, int32_t y);
|
||||
static void sub_68B3FB(paint_session& session, int32_t x, int32_t y);
|
||||
|
||||
const int32_t SEGMENTS_ALL = SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC
|
||||
| SEGMENT_D0 | SEGMENT_D4;
|
||||
@@ -47,18 +47,18 @@ const int32_t SEGMENTS_ALL = SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C0 |
|
||||
*
|
||||
* rct2: 0x0068B35F
|
||||
*/
|
||||
void tile_element_paint_setup(paint_session* session, const CoordsXY& mapCoords, bool isTrackPiecePreview)
|
||||
void tile_element_paint_setup(paint_session& session, const CoordsXY& mapCoords, bool isTrackPiecePreview)
|
||||
{
|
||||
if (!map_is_edge(mapCoords))
|
||||
{
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_force_set_general_support_height(session, -1, 0);
|
||||
session->Unk141E9DB = isTrackPiecePreview ? PaintSessionFlags::IsTrackPiecePreview : 0;
|
||||
session->WaterHeight = 0xFFFF;
|
||||
session.Unk141E9DB = isTrackPiecePreview ? PaintSessionFlags::IsTrackPiecePreview : 0;
|
||||
session.WaterHeight = 0xFFFF;
|
||||
|
||||
sub_68B3FB(session, mapCoords.x, mapCoords.y);
|
||||
}
|
||||
else if (!(session->ViewFlags & VIEWPORT_FLAG_TRANSPARENT_BACKGROUND))
|
||||
else if (!(session.ViewFlags & VIEWPORT_FLAG_TRANSPARENT_BACKGROUND))
|
||||
{
|
||||
blank_tiles_paint(session, mapCoords.x, mapCoords.y);
|
||||
}
|
||||
@@ -68,10 +68,10 @@ void tile_element_paint_setup(paint_session* session, const CoordsXY& mapCoords,
|
||||
*
|
||||
* rct2: 0x0068B60E
|
||||
*/
|
||||
static void blank_tiles_paint(paint_session* session, int32_t x, int32_t y)
|
||||
static void blank_tiles_paint(paint_session& session, int32_t x, int32_t y)
|
||||
{
|
||||
int32_t dx = 0;
|
||||
switch (session->CurrentRotation)
|
||||
switch (session.CurrentRotation)
|
||||
{
|
||||
case 0:
|
||||
dx = x + y;
|
||||
@@ -94,7 +94,7 @@ static void blank_tiles_paint(paint_session* session, int32_t x, int32_t y)
|
||||
dx -= 16;
|
||||
int32_t bx = dx + 32;
|
||||
|
||||
rct_drawpixelinfo* dpi = &session->DPI;
|
||||
rct_drawpixelinfo* dpi = &session.DPI;
|
||||
if (bx <= dpi->y)
|
||||
return;
|
||||
dx -= 20;
|
||||
@@ -102,9 +102,9 @@ static void blank_tiles_paint(paint_session* session, int32_t x, int32_t y)
|
||||
if (dx >= dpi->y)
|
||||
return;
|
||||
|
||||
session->SpritePosition.x = x;
|
||||
session->SpritePosition.y = y;
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session.SpritePosition.x = x;
|
||||
session.SpritePosition.y = y;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
PaintAddImageAsParent(session, SPR_BLANK_TILE, { 0, 0, 16 }, { 32, 32, -1 });
|
||||
}
|
||||
|
||||
@@ -114,11 +114,11 @@ bool gShowSupportSegmentHeights = false;
|
||||
*
|
||||
* rct2: 0x0068B3FB
|
||||
*/
|
||||
static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
|
||||
static void sub_68B3FB(paint_session& session, int32_t x, int32_t y)
|
||||
{
|
||||
rct_drawpixelinfo* dpi = &session->DPI;
|
||||
rct_drawpixelinfo* dpi = &session.DPI;
|
||||
|
||||
if ((session->ViewFlags & VIEWPORT_FLAG_CLIP_VIEW))
|
||||
if ((session.ViewFlags & VIEWPORT_FLAG_CLIP_VIEW))
|
||||
{
|
||||
if (x < gClipSelectionA.x || x > gClipSelectionB.x)
|
||||
return;
|
||||
@@ -126,24 +126,24 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
|
||||
return;
|
||||
}
|
||||
|
||||
session->LeftTunnelCount = 0;
|
||||
session->RightTunnelCount = 0;
|
||||
session->LeftTunnels[0] = { 0xFF, 0xFF };
|
||||
session->RightTunnels[0] = { 0xFF, 0xFF };
|
||||
session->VerticalTunnelHeight = 0xFF;
|
||||
session->MapPosition.x = x;
|
||||
session->MapPosition.y = y;
|
||||
session.LeftTunnelCount = 0;
|
||||
session.RightTunnelCount = 0;
|
||||
session.LeftTunnels[0] = { 0xFF, 0xFF };
|
||||
session.RightTunnels[0] = { 0xFF, 0xFF };
|
||||
session.VerticalTunnelHeight = 0xFF;
|
||||
session.MapPosition.x = x;
|
||||
session.MapPosition.y = y;
|
||||
|
||||
const TileElement* tile_element = map_get_first_element_at(session->MapPosition);
|
||||
const TileElement* tile_element = map_get_first_element_at(session.MapPosition);
|
||||
if (tile_element == nullptr)
|
||||
return;
|
||||
uint8_t rotation = session->CurrentRotation;
|
||||
uint8_t rotation = session.CurrentRotation;
|
||||
|
||||
bool partOfVirtualFloor = false;
|
||||
#ifndef __TESTPAINT__
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
{
|
||||
partOfVirtualFloor = virtual_floor_tile_is_floor(session->MapPosition);
|
||||
partOfVirtualFloor = virtual_floor_tile_is_floor(session.MapPosition);
|
||||
}
|
||||
#endif // __TESTPAINT__
|
||||
|
||||
@@ -166,17 +166,17 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
|
||||
int32_t screenMinY = translate_3d_to_2d_with_z(rotation, { x, y, 0 }).y;
|
||||
|
||||
// Display little yellow arrow when building footpaths?
|
||||
if ((gMapSelectFlags & MAP_SELECT_FLAG_ENABLE_ARROW) && session->MapPosition.x == gMapSelectArrowPosition.x
|
||||
&& session->MapPosition.y == gMapSelectArrowPosition.y)
|
||||
if ((gMapSelectFlags & MAP_SELECT_FLAG_ENABLE_ARROW) && session.MapPosition.x == gMapSelectArrowPosition.x
|
||||
&& session.MapPosition.y == gMapSelectArrowPosition.y)
|
||||
{
|
||||
uint8_t arrowRotation = (rotation + (gMapSelectArrowDirection & 3)) & 3;
|
||||
|
||||
uint32_t imageId = arrowRotation + (gMapSelectArrowDirection & 0xFC) + 0x20900C27;
|
||||
int32_t arrowZ = gMapSelectArrowPosition.z;
|
||||
|
||||
session->SpritePosition.x = x;
|
||||
session->SpritePosition.y = y;
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session.SpritePosition.x = x;
|
||||
session.SpritePosition.y = y;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, arrowZ }, { 32, 32, -1 }, { 0, 0, arrowZ + 18 });
|
||||
}
|
||||
@@ -210,9 +210,9 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
|
||||
if (screenMinY - (max_height + 32) >= dpi->y + dpi->height)
|
||||
return;
|
||||
|
||||
session->SpritePosition.x = x;
|
||||
session->SpritePosition.y = y;
|
||||
session->DidPassSurface = false;
|
||||
session.SpritePosition.x = x;
|
||||
session.SpritePosition.y = y;
|
||||
session.DidPassSurface = false;
|
||||
int32_t previousBaseZ = 0;
|
||||
do
|
||||
{
|
||||
@@ -222,7 +222,7 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
|
||||
}
|
||||
|
||||
// Only paint tile_elements below the clip height.
|
||||
if ((session->ViewFlags & VIEWPORT_FLAG_CLIP_VIEW) && (tile_element->GetBaseZ() > gClipHeight * COORDS_Z_STEP))
|
||||
if ((session.ViewFlags & VIEWPORT_FLAG_CLIP_VIEW) && (tile_element->GetBaseZ() > gClipHeight * COORDS_Z_STEP))
|
||||
continue;
|
||||
|
||||
Direction direction = tile_element->GetDirectionWithOffset(rotation);
|
||||
@@ -233,8 +233,8 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
|
||||
if (baseZ != previousBaseZ)
|
||||
{
|
||||
previousBaseZ = baseZ;
|
||||
session->PathElementOnSameHeight = nullptr;
|
||||
session->TrackElementOnSameHeight = nullptr;
|
||||
session.PathElementOnSameHeight = nullptr;
|
||||
session.TrackElementOnSameHeight = nullptr;
|
||||
const TileElement* tile_element_sub_iterator = tile_element;
|
||||
while (!(tile_element_sub_iterator++)->IsLastForTile())
|
||||
{
|
||||
@@ -249,14 +249,14 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
|
||||
}
|
||||
auto type = tile_element_sub_iterator->GetType();
|
||||
if (type == TileElementType::Path)
|
||||
session->PathElementOnSameHeight = tile_element_sub_iterator;
|
||||
session.PathElementOnSameHeight = tile_element_sub_iterator;
|
||||
else if (type == TileElementType::Track)
|
||||
session->TrackElementOnSameHeight = tile_element_sub_iterator;
|
||||
session.TrackElementOnSameHeight = tile_element_sub_iterator;
|
||||
}
|
||||
}
|
||||
|
||||
CoordsXY mapPosition = session->MapPosition;
|
||||
session->CurrentlyDrawnItem = tile_element;
|
||||
CoordsXY mapPosition = session.MapPosition;
|
||||
session.CurrentlyDrawnItem = tile_element;
|
||||
// Setup the painting of for example: the underground, signs, rides, scenery, etc.
|
||||
switch (tile_element->GetType())
|
||||
{
|
||||
@@ -285,7 +285,7 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
|
||||
PaintBanner(session, direction, baseZ, *(tile_element->AsBanner()));
|
||||
break;
|
||||
}
|
||||
session->MapPosition = mapPosition;
|
||||
session.MapPosition = mapPosition;
|
||||
} while (!(tile_element++)->IsLastForTile());
|
||||
|
||||
#ifndef __TESTPAINT__
|
||||
@@ -315,17 +315,17 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
|
||||
{
|
||||
for (int32_t sx = 0; sx < 3; sx++)
|
||||
{
|
||||
uint16_t segmentHeight = session->SupportSegments[segmentPositions[sy][sx]].height;
|
||||
uint16_t segmentHeight = session.SupportSegments[segmentPositions[sy][sx]].height;
|
||||
int32_t imageColourFlats = 0b101111 << 19 | IMAGE_TYPE_TRANSPARENT;
|
||||
if (segmentHeight == 0xFFFF)
|
||||
{
|
||||
segmentHeight = session->Support.height;
|
||||
segmentHeight = session.Support.height;
|
||||
// white: 0b101101
|
||||
imageColourFlats = 0b111011 << 19 | IMAGE_TYPE_TRANSPARENT;
|
||||
}
|
||||
|
||||
// Only draw supports below the clipping height.
|
||||
if ((session->ViewFlags & VIEWPORT_FLAG_CLIP_VIEW) && (segmentHeight > gClipHeight))
|
||||
if ((session.ViewFlags & VIEWPORT_FLAG_CLIP_VIEW) && (segmentHeight > gClipHeight))
|
||||
continue;
|
||||
|
||||
int32_t xOffset = sy * 10;
|
||||
@@ -342,37 +342,37 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
|
||||
}
|
||||
}
|
||||
|
||||
void paint_util_push_tunnel_left(paint_session* session, uint16_t height, uint8_t type)
|
||||
void paint_util_push_tunnel_left(paint_session& session, uint16_t height, uint8_t type)
|
||||
{
|
||||
session->LeftTunnels[session->LeftTunnelCount] = { static_cast<uint8_t>((height / 16)), type };
|
||||
if (session->LeftTunnelCount < TUNNEL_MAX_COUNT - 1)
|
||||
session.LeftTunnels[session.LeftTunnelCount] = { static_cast<uint8_t>((height / 16)), type };
|
||||
if (session.LeftTunnelCount < TUNNEL_MAX_COUNT - 1)
|
||||
{
|
||||
session->LeftTunnels[session->LeftTunnelCount + 1] = { 0xFF, 0xFF };
|
||||
session->LeftTunnelCount++;
|
||||
session.LeftTunnels[session.LeftTunnelCount + 1] = { 0xFF, 0xFF };
|
||||
session.LeftTunnelCount++;
|
||||
}
|
||||
}
|
||||
|
||||
void paint_util_push_tunnel_right(paint_session* session, uint16_t height, uint8_t type)
|
||||
void paint_util_push_tunnel_right(paint_session& session, uint16_t height, uint8_t type)
|
||||
{
|
||||
session->RightTunnels[session->RightTunnelCount] = { static_cast<uint8_t>((height / 16)), type };
|
||||
if (session->RightTunnelCount < TUNNEL_MAX_COUNT - 1)
|
||||
session.RightTunnels[session.RightTunnelCount] = { static_cast<uint8_t>((height / 16)), type };
|
||||
if (session.RightTunnelCount < TUNNEL_MAX_COUNT - 1)
|
||||
{
|
||||
session->RightTunnels[session->RightTunnelCount + 1] = { 0xFF, 0xFF };
|
||||
session->RightTunnelCount++;
|
||||
session.RightTunnels[session.RightTunnelCount + 1] = { 0xFF, 0xFF };
|
||||
session.RightTunnelCount++;
|
||||
}
|
||||
}
|
||||
|
||||
void paint_util_set_vertical_tunnel(paint_session* session, uint16_t height)
|
||||
void paint_util_set_vertical_tunnel(paint_session& session, uint16_t height)
|
||||
{
|
||||
#ifdef __TESTPAINT__
|
||||
testPaintVerticalTunnelHeight = height;
|
||||
#endif
|
||||
session->VerticalTunnelHeight = height / 16;
|
||||
session.VerticalTunnelHeight = height / 16;
|
||||
}
|
||||
|
||||
void paint_util_set_general_support_height(paint_session* session, int16_t height, uint8_t slope)
|
||||
void paint_util_set_general_support_height(paint_session& session, int16_t height, uint8_t slope)
|
||||
{
|
||||
if (session->Support.height >= height)
|
||||
if (session.Support.height >= height)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -380,19 +380,19 @@ void paint_util_set_general_support_height(paint_session* session, int16_t heigh
|
||||
paint_util_force_set_general_support_height(session, height, slope);
|
||||
}
|
||||
|
||||
void paint_util_force_set_general_support_height(paint_session* session, int16_t height, uint8_t slope)
|
||||
void paint_util_force_set_general_support_height(paint_session& session, int16_t height, uint8_t slope)
|
||||
{
|
||||
session->Support.height = height;
|
||||
session->Support.slope = slope;
|
||||
session.Support.height = height;
|
||||
session.Support.slope = slope;
|
||||
}
|
||||
|
||||
const uint16_t segment_offsets[9] = {
|
||||
SEGMENT_B4, SEGMENT_B8, SEGMENT_BC, SEGMENT_C0, SEGMENT_C4, SEGMENT_C8, SEGMENT_CC, SEGMENT_D0, SEGMENT_D4,
|
||||
};
|
||||
|
||||
void paint_util_set_segment_support_height(paint_session* session, int32_t segments, uint16_t height, uint8_t slope)
|
||||
void paint_util_set_segment_support_height(paint_session& session, int32_t segments, uint16_t height, uint8_t slope)
|
||||
{
|
||||
support_height* supportSegments = session->SupportSegments;
|
||||
support_height* supportSegments = session.SupportSegments;
|
||||
for (int32_t s = 0; s < 9; s++)
|
||||
{
|
||||
if (segments & segment_offsets[s])
|
||||
@@ -414,8 +414,8 @@ uint16_t paint_util_rotate_segments(uint16_t segments, uint8_t rotation)
|
||||
return (segments & 0xFF00) | temp;
|
||||
}
|
||||
|
||||
bool PaintShouldShowHeightMarkers(const paint_session* session, const uint32_t viewportFlag)
|
||||
bool PaintShouldShowHeightMarkers(const paint_session& session, const uint32_t viewportFlag)
|
||||
{
|
||||
auto dpi = &session->DPI;
|
||||
return (session->ViewFlags & viewportFlag) && (dpi->zoom_level <= ZoomLevel{ 0 });
|
||||
auto dpi = &session.DPI;
|
||||
return (session.ViewFlags & viewportFlag) && (dpi->zoom_level <= ZoomLevel{ 0 });
|
||||
}
|
||||
@@ -91,24 +91,24 @@ extern const CoordsXY BannerBoundBoxes[][2];
|
||||
|
||||
extern const uint8_t PathSlopeToLandSlope[4];
|
||||
|
||||
void paint_util_push_tunnel_left(paint_session* session, uint16_t height, uint8_t type);
|
||||
void paint_util_push_tunnel_right(paint_session* session, uint16_t height, uint8_t type);
|
||||
void paint_util_set_vertical_tunnel(paint_session* session, uint16_t height);
|
||||
void paint_util_push_tunnel_left(paint_session& session, uint16_t height, uint8_t type);
|
||||
void paint_util_push_tunnel_right(paint_session& session, uint16_t height, uint8_t type);
|
||||
void paint_util_set_vertical_tunnel(paint_session& session, uint16_t height);
|
||||
|
||||
void paint_util_set_general_support_height(paint_session* session, int16_t height, uint8_t slope);
|
||||
void paint_util_force_set_general_support_height(paint_session* session, int16_t height, uint8_t slope);
|
||||
void paint_util_set_segment_support_height(paint_session* session, int32_t segments, uint16_t height, uint8_t slope);
|
||||
void paint_util_set_general_support_height(paint_session& session, int16_t height, uint8_t slope);
|
||||
void paint_util_force_set_general_support_height(paint_session& session, int16_t height, uint8_t slope);
|
||||
void paint_util_set_segment_support_height(paint_session& session, int32_t segments, uint16_t height, uint8_t slope);
|
||||
uint16_t paint_util_rotate_segments(uint16_t segments, uint8_t rotation);
|
||||
|
||||
void tile_element_paint_setup(paint_session* session, const CoordsXY& mapCoords, bool isTrackPiecePreview = false);
|
||||
void tile_element_paint_setup(paint_session& session, const CoordsXY& mapCoords, bool isTrackPiecePreview = false);
|
||||
|
||||
void PaintEntrance(paint_session* session, uint8_t direction, int32_t height, const EntranceElement& entranceElement);
|
||||
void PaintBanner(paint_session* session, uint8_t direction, int32_t height, const BannerElement& bannerElement);
|
||||
void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, const SurfaceElement& tileElement);
|
||||
void PaintPath(paint_session* session, uint16_t height, const PathElement& tileElement);
|
||||
void PaintSmallScenery(paint_session* session, uint8_t direction, int32_t height, const SmallSceneryElement& sceneryElement);
|
||||
void PaintWall(paint_session* session, uint8_t direction, int32_t height, const WallElement& tileElement);
|
||||
void PaintLargeScenery(paint_session* session, uint8_t direction, uint16_t height, const LargeSceneryElement& tileElement);
|
||||
void PaintTrack(paint_session* session, uint8_t direction, int32_t height, const TrackElement& tileElement);
|
||||
void PaintEntrance(paint_session& session, uint8_t direction, int32_t height, const EntranceElement& entranceElement);
|
||||
void PaintBanner(paint_session& session, uint8_t direction, int32_t height, const BannerElement& bannerElement);
|
||||
void PaintSurface(paint_session& session, uint8_t direction, uint16_t height, const SurfaceElement& tileElement);
|
||||
void PaintPath(paint_session& session, uint16_t height, const PathElement& tileElement);
|
||||
void PaintSmallScenery(paint_session& session, uint8_t direction, int32_t height, const SmallSceneryElement& sceneryElement);
|
||||
void PaintWall(paint_session& session, uint8_t direction, int32_t height, const WallElement& tileElement);
|
||||
void PaintLargeScenery(paint_session& session, uint8_t direction, uint16_t height, const LargeSceneryElement& tileElement);
|
||||
void PaintTrack(paint_session& session, uint8_t direction, int32_t height, const TrackElement& tileElement);
|
||||
|
||||
bool PaintShouldShowHeightMarkers(const paint_session* session, const uint32_t viewportFlag);
|
||||
bool PaintShouldShowHeightMarkers(const paint_session& session, const uint32_t viewportFlag);
|
||||
@@ -45,7 +45,7 @@ static constexpr const uint8_t* DirectionToDoorImageOffset[] = { DirectionToDoor
|
||||
DirectionToDoorImageOffset2, DirectionToDoorImageOffset3 };
|
||||
|
||||
static void PaintWallDoor(
|
||||
paint_session* session, const WallSceneryEntry& wallEntry, ImageId imageId, CoordsXYZ offset, CoordsXYZ bbLengthR1,
|
||||
paint_session& session, const WallSceneryEntry& wallEntry, ImageId imageId, CoordsXYZ offset, CoordsXYZ bbLengthR1,
|
||||
CoordsXYZ bbOffsetR1, CoordsXYZ bbLengthR2, CoordsXYZ bbOffsetR2, CoordsXYZ bbLengthL, CoordsXYZ bbOffsetL)
|
||||
{
|
||||
auto newImageId0 = imageId;
|
||||
@@ -63,7 +63,7 @@ static void PaintWallDoor(
|
||||
}
|
||||
|
||||
static void PaintWallDoor(
|
||||
paint_session* session, const WallSceneryEntry& wallEntry, const WallElement& wallElement, ImageId imageTemplate,
|
||||
paint_session& session, const WallSceneryEntry& wallEntry, const WallElement& wallElement, ImageId imageTemplate,
|
||||
Direction direction, int32_t height)
|
||||
{
|
||||
auto bbHeight = wallEntry.height * 8 - 2;
|
||||
@@ -148,7 +148,7 @@ static void PaintWallDoor(
|
||||
}
|
||||
|
||||
static void PaintWallWall(
|
||||
paint_session* session, const WallSceneryEntry& wallEntry, ImageId imageTemplate, uint32_t imageOffset, CoordsXYZ offset,
|
||||
paint_session& session, const WallSceneryEntry& wallEntry, ImageId imageTemplate, uint32_t imageOffset, CoordsXYZ offset,
|
||||
CoordsXYZ bounds, CoordsXYZ boundsOffset, bool isGhost)
|
||||
{
|
||||
auto frameNum = (wallEntry.flags2 & WALL_SCENERY_2_ANIMATED) ? (gCurrentTicks & 7) * 2 : 0;
|
||||
@@ -162,7 +162,7 @@ static void PaintWallWall(
|
||||
}
|
||||
|
||||
static void PaintWallScrollingText(
|
||||
paint_session* session, const WallSceneryEntry& wallEntry, const WallElement& wallElement, Direction direction,
|
||||
paint_session& session, const WallSceneryEntry& wallEntry, const WallElement& wallElement, Direction direction,
|
||||
int32_t height, const CoordsXYZ& boundsOffset, bool isGhost)
|
||||
{
|
||||
if (direction != 0 && direction != 3)
|
||||
@@ -202,7 +202,7 @@ static void PaintWallScrollingText(
|
||||
}
|
||||
|
||||
static void PaintWallWall(
|
||||
paint_session* session, const WallSceneryEntry& wallEntry, const WallElement& wallElement, ImageId imageTemplate,
|
||||
paint_session& session, const WallSceneryEntry& wallEntry, const WallElement& wallElement, ImageId imageTemplate,
|
||||
Direction direction, int32_t height, bool isGhost)
|
||||
{
|
||||
uint8_t bbHeight = wallEntry.height * 8 - 2;
|
||||
@@ -311,7 +311,7 @@ static void PaintWallWall(
|
||||
PaintWallScrollingText(session, wallEntry, wallElement, direction, height, boundsOffset, isGhost);
|
||||
}
|
||||
|
||||
void PaintWall(paint_session* session, uint8_t direction, int32_t height, const WallElement& wallElement)
|
||||
void PaintWall(paint_session& session, uint8_t direction, int32_t height, const WallElement& wallElement)
|
||||
{
|
||||
auto* wallEntry = wallElement.GetEntry();
|
||||
if (wallEntry == nullptr)
|
||||
@@ -319,7 +319,7 @@ void PaintWall(paint_session* session, uint8_t direction, int32_t height, const
|
||||
return;
|
||||
}
|
||||
|
||||
session->InteractionType = ViewportInteractionItem::Wall;
|
||||
session.InteractionType = ViewportInteractionItem::Wall;
|
||||
|
||||
ImageId imageTemplate;
|
||||
if (wallEntry->flags & WALL_SCENERY_HAS_PRIMARY_COLOUR)
|
||||
@@ -338,7 +338,7 @@ void PaintWall(paint_session* session, uint8_t direction, int32_t height, const
|
||||
paint_util_set_general_support_height(session, 8 * wallElement.clearance_height, 0x20);
|
||||
|
||||
auto isGhost = false;
|
||||
if (gTrackDesignSaveMode || (session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
if (gTrackDesignSaveMode || (session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
{
|
||||
if (!track_design_save_contains_tile_element(reinterpret_cast<const TileElement*>(&wallElement)))
|
||||
{
|
||||
@@ -349,7 +349,7 @@ void PaintWall(paint_session* session, uint8_t direction, int32_t height, const
|
||||
|
||||
if (wallElement.IsGhost())
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
imageTemplate = ImageId().WithRemap(FilterPaletteID::Palette44);
|
||||
isGhost = true;
|
||||
}
|
||||
|
||||
+157
-157
@@ -264,7 +264,7 @@ bool track_paint_util_has_fence(
|
||||
}
|
||||
|
||||
void track_paint_util_paint_floor(
|
||||
paint_session* session, uint8_t edges, uint32_t colourFlags, uint16_t height, const uint32_t floorSprites[4],
|
||||
paint_session& session, uint8_t edges, uint32_t colourFlags, uint16_t height, const uint32_t floorSprites[4],
|
||||
const StationObject* stationStyle)
|
||||
{
|
||||
if (stationStyle != nullptr && stationStyle->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)
|
||||
@@ -293,7 +293,7 @@ void track_paint_util_paint_floor(
|
||||
}
|
||||
|
||||
void track_paint_util_paint_fences(
|
||||
paint_session* session, uint8_t edges, const CoordsXY& position, const TrackElement& trackElement, const Ride& ride,
|
||||
paint_session& session, uint8_t edges, const CoordsXY& position, const TrackElement& trackElement, const Ride& ride,
|
||||
uint32_t colourFlags, uint16_t height, const uint32_t fenceSprites[4], uint8_t rotation)
|
||||
{
|
||||
uint32_t imageId;
|
||||
@@ -333,34 +333,34 @@ bool track_paint_util_should_paint_supports(const CoordsXY& position)
|
||||
}
|
||||
|
||||
static void track_paint_util_draw_station_impl(
|
||||
paint_session* session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight,
|
||||
paint_session& session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight,
|
||||
const TrackElement& trackElement, int32_t fenceOffsetA, int32_t fenceOffsetB);
|
||||
|
||||
void track_paint_util_draw_station(
|
||||
paint_session* session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement)
|
||||
paint_session& session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement)
|
||||
{
|
||||
track_paint_util_draw_station_impl(session, ride, direction, height, height, trackElement, 5, 7);
|
||||
}
|
||||
|
||||
void track_paint_util_draw_station_2(
|
||||
paint_session* session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement,
|
||||
paint_session& session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement,
|
||||
int32_t fenceOffsetA, int32_t fenceOffsetB)
|
||||
{
|
||||
track_paint_util_draw_station_impl(session, ride, direction, height, height, trackElement, fenceOffsetA, fenceOffsetB);
|
||||
}
|
||||
|
||||
void track_paint_util_draw_station_3(
|
||||
paint_session* session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight,
|
||||
paint_session& session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
track_paint_util_draw_station_impl(session, ride, direction, height, coverHeight, trackElement, 5, 7);
|
||||
}
|
||||
|
||||
static void track_paint_util_draw_station_impl(
|
||||
paint_session* session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight,
|
||||
paint_session& session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight,
|
||||
const TrackElement& trackElement, int32_t fenceOffsetA, int32_t fenceOffsetB)
|
||||
{
|
||||
CoordsXY position = session->MapPosition;
|
||||
CoordsXY position = session.MapPosition;
|
||||
const auto* stationObj = ride.GetStationObject();
|
||||
const bool hasGreenLight = trackElement.HasGreenLight();
|
||||
|
||||
@@ -373,7 +373,7 @@ static void track_paint_util_draw_station_impl(
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
// height += 5 (height + 5);
|
||||
hasFence = track_paint_util_has_fence(EDGE_NW, position, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_NW, position, trackElement, ride, session.CurrentRotation);
|
||||
|
||||
if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 0)
|
||||
{
|
||||
@@ -381,24 +381,24 @@ static void track_paint_util_draw_station_impl(
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_GREEN_LIGHT_SW_NE
|
||||
: SPR_STATION_PLATFORM_END_GREEN_LIGHT_SW_NE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_SW_NE
|
||||
: SPR_STATION_PLATFORM_END_RED_LIGHT_SW_NE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 2)
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_BEGIN_FENCED_SW_NE : SPR_STATION_PLATFORM_BEGIN_SW_NE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_SW_NE : SPR_STATION_PLATFORM_SW_NE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height + fenceOffsetA }, { 32, 8, 1 });
|
||||
// height -= 5 (height)
|
||||
@@ -408,46 +408,46 @@ static void track_paint_util_draw_station_impl(
|
||||
if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 0)
|
||||
{
|
||||
imageId = (hasGreenLight ? SPR_STATION_PLATFORM_END_GREEN_LIGHT_SW_NE : SPR_STATION_PLATFORM_END_RED_LIGHT_SW_NE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 2)
|
||||
{
|
||||
imageId = SPR_STATION_PLATFORM_BEGIN_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_PLATFORM_BEGIN_SW_NE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_PLATFORM_SW_NE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
PaintAddImageAsParent(session, imageId, { 0, 24, height + fenceOffsetA }, { 32, 8, 1 });
|
||||
// height += 2 (height + 7)
|
||||
|
||||
hasFence = track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, session.CurrentRotation);
|
||||
if (hasFence)
|
||||
{
|
||||
if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 0)
|
||||
{
|
||||
imageId = SPR_STATION_BEGIN_ANGLE_FENCE_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_BEGIN_ANGLE_FENCE_SW_NE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 2)
|
||||
{
|
||||
imageId = SPR_STATION_LIGHT_BACK_ANGLE_FENCED_NE_SW | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_LIGHT_BACK_ANGLE_FENCED_NE_SW | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = SPR_STATION_FENCE_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_FENCE_SW_NE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
PaintAddImageAsParent(session, imageId, { 0, 31, height + fenceOffsetB }, { 32, 1, 7 });
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 0)
|
||||
{
|
||||
// Addition: draw only small fence if there is an entrance/exit at the beginning
|
||||
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 31, 23, height + fenceOffsetB }, { 1, 8, 7 });
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 2)
|
||||
{
|
||||
// Addition: draw only small fence if there is an entrance/exit at the end
|
||||
imageId = SPR_STATION_LIGHT_BACK_NE_SW | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_LIGHT_BACK_NE_SW | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 31, 23, height + fenceOffsetB }, { 1, 8, 7 });
|
||||
}
|
||||
// height -= 7 (height)
|
||||
@@ -456,19 +456,19 @@ static void track_paint_util_draw_station_impl(
|
||||
|
||||
if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 0)
|
||||
{
|
||||
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 31, 0, height + fenceOffsetB }, { 1, 8, 7 });
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 2)
|
||||
{
|
||||
imageId = SPR_STATION_LIGHT_BACK_NE_SW | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_LIGHT_BACK_NE_SW | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 31, 0, height + fenceOffsetB }, { 1, 8, 7 });
|
||||
}
|
||||
}
|
||||
else if (direction == 1 || direction == 3)
|
||||
{
|
||||
// height += 5 (height + 5);
|
||||
hasFence = track_paint_util_has_fence(EDGE_NE, position, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_NE, position, trackElement, ride, session.CurrentRotation);
|
||||
|
||||
if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 3)
|
||||
{
|
||||
@@ -476,24 +476,24 @@ static void track_paint_util_draw_station_impl(
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_GREEN_LIGHT_NW_SE
|
||||
: SPR_STATION_PLATFORM_END_GREEN_LIGHT_NW_SE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_NW_SE
|
||||
: SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 1)
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_BEGIN_FENCED_NW_SE : SPR_STATION_PLATFORM_BEGIN_NW_SE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_NW_SE : SPR_STATION_PLATFORM_NW_SE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height + fenceOffsetA }, { 8, 32, 1 });
|
||||
// height -= 5 (height)
|
||||
@@ -503,46 +503,46 @@ static void track_paint_util_draw_station_impl(
|
||||
if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 3)
|
||||
{
|
||||
imageId = (hasGreenLight ? SPR_STATION_PLATFORM_END_GREEN_LIGHT_NW_SE : SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 1)
|
||||
{
|
||||
imageId = SPR_STATION_PLATFORM_BEGIN_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_PLATFORM_BEGIN_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = SPR_STATION_PLATFORM_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_PLATFORM_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
PaintAddImageAsParent(session, imageId, { 24, 0, height + fenceOffsetA }, { 8, 32, 1 });
|
||||
// height += 2 (height + 7)
|
||||
|
||||
hasFence = track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session.CurrentRotation);
|
||||
if (hasFence)
|
||||
{
|
||||
if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 3)
|
||||
{
|
||||
imageId = SPR_STATION_BEGIN_ANGLE_FENCE_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_BEGIN_ANGLE_FENCE_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 1)
|
||||
{
|
||||
imageId = SPR_STATION_LIGHT_BACK_ANGLE_FENCED_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_LIGHT_BACK_ANGLE_FENCED_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = SPR_STATION_FENCE_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_FENCE_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
PaintAddImageAsParent(session, imageId, { 31, 0, height + fenceOffsetB }, { 1, 32, 7 });
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 3)
|
||||
{
|
||||
// Addition: draw only small fence if there is an entrance/exit at the beginning
|
||||
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 23, 31, height + fenceOffsetB }, { 8, 1, 7 });
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 1)
|
||||
{
|
||||
// Addition: draw only small fence if there is an entrance/exit at the end
|
||||
imageId = SPR_STATION_LIGHT_BACK_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_LIGHT_BACK_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 23, 31, height + fenceOffsetB }, { 8, 1, 7 });
|
||||
}
|
||||
|
||||
@@ -552,22 +552,22 @@ static void track_paint_util_draw_station_impl(
|
||||
|
||||
if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 3)
|
||||
{
|
||||
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 31, height + fenceOffsetB }, { 8, 1, 7 });
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 1)
|
||||
{
|
||||
imageId = SPR_STATION_LIGHT_BACK_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_LIGHT_BACK_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 31, height + fenceOffsetB }, { 8, 1, 7 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void track_paint_util_draw_station_inverted(
|
||||
paint_session* session, const Ride& ride, Direction direction, int32_t height, const TrackElement& trackElement,
|
||||
paint_session& session, const Ride& ride, Direction direction, int32_t height, const TrackElement& trackElement,
|
||||
uint8_t stationVariant)
|
||||
{
|
||||
CoordsXY position = session->MapPosition;
|
||||
CoordsXY position = session.MapPosition;
|
||||
const auto* stationObj = ride.GetStationObject();
|
||||
const bool hasGreenLight = trackElement.HasGreenLight();
|
||||
|
||||
@@ -580,7 +580,7 @@ void track_paint_util_draw_station_inverted(
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
// height += 5 (height + 5);
|
||||
hasFence = track_paint_util_has_fence(EDGE_NW, position, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_NW, position, trackElement, ride, session.CurrentRotation);
|
||||
|
||||
if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 0)
|
||||
{
|
||||
@@ -588,24 +588,24 @@ void track_paint_util_draw_station_inverted(
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_GREEN_LIGHT_SW_NE
|
||||
: SPR_STATION_PLATFORM_END_GREEN_LIGHT_SW_NE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_SW_NE
|
||||
: SPR_STATION_PLATFORM_END_RED_LIGHT_SW_NE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 2)
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_BEGIN_FENCED_SW_NE : SPR_STATION_PLATFORM_BEGIN_SW_NE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_SW_NE : SPR_STATION_PLATFORM_SW_NE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height + 6 }, { 32, 8, 1 });
|
||||
// height -= 5 (height)
|
||||
@@ -615,46 +615,46 @@ void track_paint_util_draw_station_inverted(
|
||||
if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 0)
|
||||
{
|
||||
imageId = (hasGreenLight ? SPR_STATION_PLATFORM_END_GREEN_LIGHT_SW_NE : SPR_STATION_PLATFORM_END_RED_LIGHT_SW_NE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 2)
|
||||
{
|
||||
imageId = SPR_STATION_PLATFORM_BEGIN_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_PLATFORM_BEGIN_SW_NE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_PLATFORM_SW_NE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
PaintAddImageAsParent(session, imageId, { 0, 24, height + 6 }, { 32, 8, 1 });
|
||||
// height += 2 (height + 7)
|
||||
|
||||
hasFence = track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, session.CurrentRotation);
|
||||
if (hasFence)
|
||||
{
|
||||
if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 0)
|
||||
{
|
||||
imageId = SPR_STATION_INVERTED_BEGIN_ANGLE_FENCE_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_INVERTED_BEGIN_ANGLE_FENCE_SW_NE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 2)
|
||||
{
|
||||
imageId = SPR_STATION_INVERTED_LIGHT_BACK_ANGLE_FENCED_NE_SW | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_INVERTED_LIGHT_BACK_ANGLE_FENCED_NE_SW | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = SPR_STATION_INVERTED_FENCE_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_INVERTED_FENCE_SW_NE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
PaintAddImageAsParent(session, imageId, { 0, 31, height + 8 }, { 32, 1, 7 });
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 0)
|
||||
{
|
||||
// Addition: draw only small fence if there is an entrance/exit at the beginning
|
||||
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 31, 23, height + 8 }, { 1, 8, 7 });
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 2)
|
||||
{
|
||||
// Addition: draw only small fence if there is an entrance/exit at the end
|
||||
imageId = SPR_STATION_LIGHT_BACK_NE_SW | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_LIGHT_BACK_NE_SW | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 31, 23, height + 8 }, { 1, 8, 7 });
|
||||
}
|
||||
// height -= 7 (height)
|
||||
@@ -663,19 +663,19 @@ void track_paint_util_draw_station_inverted(
|
||||
|
||||
if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 0)
|
||||
{
|
||||
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 31, 0, height + 8 }, { 1, 8, 7 });
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 2)
|
||||
{
|
||||
imageId = SPR_STATION_LIGHT_BACK_NE_SW | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_LIGHT_BACK_NE_SW | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 31, 0, height + 8 }, { 1, 8, 7 });
|
||||
}
|
||||
}
|
||||
else if (direction == 1 || direction == 3)
|
||||
{
|
||||
// height += 5 (height + 5);
|
||||
hasFence = track_paint_util_has_fence(EDGE_NE, position, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_NE, position, trackElement, ride, session.CurrentRotation);
|
||||
|
||||
if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 3)
|
||||
{
|
||||
@@ -683,24 +683,24 @@ void track_paint_util_draw_station_inverted(
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_GREEN_LIGHT_NW_SE
|
||||
: SPR_STATION_PLATFORM_END_GREEN_LIGHT_NW_SE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_NW_SE
|
||||
: SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 1)
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_BEGIN_FENCED_NW_SE : SPR_STATION_PLATFORM_BEGIN_NW_SE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_NW_SE : SPR_STATION_PLATFORM_NW_SE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height + 6 }, { 8, 32, 1 });
|
||||
// height -= 5 (height)
|
||||
@@ -710,46 +710,46 @@ void track_paint_util_draw_station_inverted(
|
||||
if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 3)
|
||||
{
|
||||
imageId = (hasGreenLight ? SPR_STATION_PLATFORM_END_GREEN_LIGHT_NW_SE : SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 1)
|
||||
{
|
||||
imageId = SPR_STATION_PLATFORM_BEGIN_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_PLATFORM_BEGIN_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = SPR_STATION_PLATFORM_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_PLATFORM_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
PaintAddImageAsParent(session, imageId, { 24, 0, height + 6 }, { 8, 32, 1 });
|
||||
// height += 2 (height + 7)
|
||||
|
||||
hasFence = track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session.CurrentRotation);
|
||||
if (hasFence)
|
||||
{
|
||||
if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 3)
|
||||
{
|
||||
imageId = SPR_STATION_INVERTED_BEGIN_ANGLE_FENCE_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_INVERTED_BEGIN_ANGLE_FENCE_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 1)
|
||||
{
|
||||
imageId = SPR_STATION_INVERTED_LIGHT_BACK_ANGLE_FENCED_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_INVERTED_LIGHT_BACK_ANGLE_FENCED_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = SPR_STATION_INVERTED_FENCE_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_INVERTED_FENCE_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
PaintAddImageAsParent(session, imageId, { 31, 0, height + 8 }, { 1, 32, 7 });
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 3)
|
||||
{
|
||||
// Addition: draw only small fence if there is an entrance/exit at the beginning
|
||||
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 23, 31, height + 8 }, { 8, 1, 7 });
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 1)
|
||||
{
|
||||
// Addition: draw only small fence if there is an entrance/exit at the end
|
||||
imageId = SPR_STATION_LIGHT_BACK_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_LIGHT_BACK_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 23, 31, height + 8 }, { 8, 1, 7 });
|
||||
}
|
||||
|
||||
@@ -759,25 +759,25 @@ void track_paint_util_draw_station_inverted(
|
||||
|
||||
if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 3)
|
||||
{
|
||||
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 31, height + 8 }, { 8, 1, 7 });
|
||||
}
|
||||
else if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 1)
|
||||
{
|
||||
imageId = SPR_STATION_LIGHT_BACK_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_LIGHT_BACK_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 31, height + 8 }, { 8, 1, 7 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool track_paint_util_draw_station_covers(
|
||||
paint_session* session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height)
|
||||
paint_session& session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height)
|
||||
{
|
||||
return track_paint_util_draw_station_covers_2(session, edge, hasFence, stationObject, height, STATION_VARIANT_BASIC);
|
||||
}
|
||||
|
||||
bool track_paint_util_draw_station_covers_2(
|
||||
paint_session* session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height,
|
||||
paint_session& session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height,
|
||||
uint8_t stationVariant)
|
||||
{
|
||||
if (stationObject == nullptr)
|
||||
@@ -785,7 +785,7 @@ bool track_paint_util_draw_station_covers_2(
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(session->Unk141E9DB & (PaintSessionFlags::IsPassedSurface | PaintSessionFlags::IsTrackPiecePreview)))
|
||||
if (!(session.Unk141E9DB & (PaintSessionFlags::IsPassedSurface | PaintSessionFlags::IsTrackPiecePreview)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -832,12 +832,12 @@ bool track_paint_util_draw_station_covers_2(
|
||||
imageOffset += SPR_STATION_COVER_OFFSET_TALL;
|
||||
}
|
||||
|
||||
auto imageTemplate = ImageId::FromUInt32(session->TrackColours[SCHEME_TRACK]);
|
||||
auto imageTemplate = ImageId::FromUInt32(session.TrackColours[SCHEME_TRACK]);
|
||||
auto imageId = imageTemplate.WithIndex(baseImageIndex + imageOffset);
|
||||
PaintAddImageAsParent(session, imageId, offset, bounds, boundsOffset);
|
||||
|
||||
// Glass
|
||||
if (session->TrackColours[SCHEME_MISC] == IMAGE_TYPE_REMAP && (stationObject->Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT))
|
||||
if (session.TrackColours[SCHEME_MISC] == IMAGE_TYPE_REMAP && (stationObject->Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT))
|
||||
{
|
||||
imageId = ImageId(baseImageIndex + imageOffset + 12).WithTransparancy(imageTemplate.GetPrimary());
|
||||
PaintAddImageAsChild(session, imageId, offset, bounds, boundsOffset);
|
||||
@@ -846,48 +846,48 @@ bool track_paint_util_draw_station_covers_2(
|
||||
}
|
||||
|
||||
void track_paint_util_draw_narrow_station_platform(
|
||||
paint_session* session, const Ride& ride, Direction direction, int32_t height, int32_t zOffset,
|
||||
paint_session& session, const Ride& ride, Direction direction, int32_t height, int32_t zOffset,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
CoordsXY position = session->MapPosition;
|
||||
CoordsXY position = session.MapPosition;
|
||||
const auto* stationObj = ride.GetStationObject();
|
||||
if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)
|
||||
return;
|
||||
|
||||
if (direction & 1)
|
||||
{
|
||||
bool hasFence = track_paint_util_has_fence(EDGE_NE, position, trackElement, ride, session->CurrentRotation);
|
||||
bool hasFence = track_paint_util_has_fence(EDGE_NE, position, trackElement, ride, session.CurrentRotation);
|
||||
uint32_t imageId = (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NE : SPR_STATION_NARROW_EDGE_NE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height + zOffset }, { 8, 32, 1 });
|
||||
track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height);
|
||||
|
||||
imageId = SPR_STATION_NARROW_EDGE_SW | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_NARROW_EDGE_SW | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 24, 0, height + zOffset }, { 8, 32, 1 });
|
||||
|
||||
hasFence = track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session.CurrentRotation);
|
||||
if (hasFence)
|
||||
{
|
||||
imageId = SPR_STATION_FENCE_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_FENCE_NW_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 31, 0, height + zOffset + 2 }, { 1, 32, 7 });
|
||||
}
|
||||
track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
bool hasFence = track_paint_util_has_fence(EDGE_NW, position, trackElement, ride, session->CurrentRotation);
|
||||
bool hasFence = track_paint_util_has_fence(EDGE_NW, position, trackElement, ride, session.CurrentRotation);
|
||||
uint32_t imageId = (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NW : SPR_STATION_NARROW_EDGE_NW)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height + zOffset }, { 32, 8, 1 });
|
||||
track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height);
|
||||
|
||||
imageId = SPR_STATION_NARROW_EDGE_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_NARROW_EDGE_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 24, height + zOffset }, { 32, 8, 1 });
|
||||
|
||||
hasFence = track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, session.CurrentRotation);
|
||||
if (hasFence)
|
||||
{
|
||||
imageId = SPR_STATION_FENCE_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_FENCE_SW_NE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 31, height + zOffset + 2 }, { 32, 1, 7 });
|
||||
}
|
||||
track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, height);
|
||||
@@ -895,7 +895,7 @@ void track_paint_util_draw_narrow_station_platform(
|
||||
}
|
||||
|
||||
void track_paint_util_draw_pier(
|
||||
paint_session* session, const Ride& ride, const StationObject* stationObj, const CoordsXY& position, Direction direction,
|
||||
paint_session& session, const Ride& ride, const StationObject* stationObj, const CoordsXY& position, Direction direction,
|
||||
int32_t height, const TrackElement& trackElement, uint8_t rotation)
|
||||
{
|
||||
if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)
|
||||
@@ -906,19 +906,19 @@ void track_paint_util_draw_pier(
|
||||
|
||||
if (direction & 1)
|
||||
{
|
||||
hasFence = track_paint_util_has_fence(EDGE_NE, position, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_NE, position, trackElement, ride, session.CurrentRotation);
|
||||
imageId = (hasFence ? SPR_STATION_PIER_EDGE_NE_FENCED : SPR_STATION_PIER_EDGE_NE)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 6, 32, 1 }, { 2, 0, height });
|
||||
track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height);
|
||||
|
||||
imageId = SPR_STATION_PIER_EDGE_SW | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_PIER_EDGE_SW | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 24, 0, height }, { 8, 32, 1 });
|
||||
|
||||
hasFence = track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session.CurrentRotation);
|
||||
if (hasFence)
|
||||
{
|
||||
imageId = SPR_STATION_PIER_FENCE_SW | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_PIER_FENCE_SW | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 31, 0, height + 2 }, { 1, 32, 7 });
|
||||
}
|
||||
track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, height);
|
||||
@@ -927,30 +927,30 @@ void track_paint_util_draw_pier(
|
||||
{
|
||||
hasFence = track_paint_util_has_fence(EDGE_NW, position, trackElement, ride, rotation);
|
||||
imageId = (hasFence ? SPR_STATION_PIER_EDGE_NW_FENCED : SPR_STATION_PIER_EDGE_NW)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 6, 1 }, { 0, 2, height });
|
||||
track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height);
|
||||
|
||||
imageId = SPR_STATION_PIER_EDGE_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_PIER_EDGE_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 24, height }, { 32, 8, 1 });
|
||||
|
||||
hasFence = track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, rotation);
|
||||
if (hasFence)
|
||||
{
|
||||
imageId = SPR_STATION_PIER_FENCE_SE | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = SPR_STATION_PIER_FENCE_SE | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 31, height + 2 }, { 32, 1, 7 });
|
||||
}
|
||||
track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, height);
|
||||
}
|
||||
}
|
||||
|
||||
void track_paint_util_draw_station_metal_supports(paint_session* session, Direction direction, uint16_t height, uint32_t colour)
|
||||
void track_paint_util_draw_station_metal_supports(paint_session& session, Direction direction, uint16_t height, uint32_t colour)
|
||||
{
|
||||
track_paint_util_draw_station_metal_supports_2(session, direction, height, colour, 3);
|
||||
}
|
||||
|
||||
void track_paint_util_draw_station_metal_supports_2(
|
||||
paint_session* session, Direction direction, uint16_t height, uint32_t colour, uint8_t type)
|
||||
paint_session& session, Direction direction, uint16_t height, uint32_t colour, uint8_t type)
|
||||
{
|
||||
if (direction & 1)
|
||||
{
|
||||
@@ -1018,7 +1018,7 @@ static constexpr const int8_t right_helix_up_small_quarter_tiles_sprite_map[] =
|
||||
};
|
||||
|
||||
void track_paint_util_right_helix_up_small_quarter_tiles_paint(
|
||||
paint_session* session, const int8_t thickness[2], int16_t height, Direction direction, uint8_t trackSequence,
|
||||
paint_session& session, const int8_t thickness[2], int16_t height, Direction direction, uint8_t trackSequence,
|
||||
uint32_t colourFlags, const uint32_t sprites[4][3][2], const CoordsXY offsets[4][3][2],
|
||||
const CoordsXY boundsLengths[4][3][2], const CoordsXYZ boundsOffsets[4][3][2])
|
||||
{
|
||||
@@ -1118,7 +1118,7 @@ static constexpr const int8_t right_helix_up_large_quarter_sprite_map[] = {
|
||||
0, -1, 1, 2, -1, 3, 4,
|
||||
};
|
||||
void track_paint_util_right_helix_up_large_quarter_tiles_paint(
|
||||
paint_session* session, const int8_t thickness[2], int16_t height, Direction direction, uint8_t trackSequence,
|
||||
paint_session& session, const int8_t thickness[2], int16_t height, Direction direction, uint8_t trackSequence,
|
||||
uint32_t colourFlags, const uint32_t sprites[4][5][2], const CoordsXY offsets[4][5][2],
|
||||
const CoordsXY boundsLengths[4][5][2], const CoordsXYZ boundsOffsets[4][5][2])
|
||||
{
|
||||
@@ -1295,7 +1295,7 @@ static constexpr const int8_t eighth_to_diag_sprite_map[] = {
|
||||
0, 1, 2, -1, 3,
|
||||
};
|
||||
void track_paint_util_eighth_to_diag_tiles_paint(
|
||||
paint_session* session, const int8_t thickness[4][4], int16_t height, Direction direction, uint8_t trackSequence,
|
||||
paint_session& session, const int8_t thickness[4][4], int16_t height, Direction direction, uint8_t trackSequence,
|
||||
uint32_t colourFlags, const uint32_t sprites[4][4], const CoordsXY offsets[4][4], const CoordsXY boundsLengths[4][4],
|
||||
const CoordsXYZ boundsOffsets[4][4])
|
||||
{
|
||||
@@ -1337,7 +1337,7 @@ static constexpr const int8_t diag_sprite_map[4][4] = {
|
||||
};
|
||||
|
||||
void track_paint_util_diag_tiles_paint(
|
||||
paint_session* session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const uint32_t sprites[4], const CoordsXY offsets[4], const CoordsXY boundsLengths[4], const CoordsXYZ boundsOffsets[4])
|
||||
{
|
||||
int32_t index = diag_sprite_map[direction][trackSequence];
|
||||
@@ -1458,7 +1458,7 @@ static constexpr const int8_t right_quarter_turn_5_tiles_sprite_map[] = {
|
||||
};
|
||||
|
||||
void track_paint_util_right_quarter_turn_5_tiles_paint(
|
||||
paint_session* session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const uint32_t sprites[4][5], const CoordsXY offsets[4][5], const CoordsXY boundsLengths[4][5],
|
||||
const CoordsXYZ boundsOffsets[4][5])
|
||||
{
|
||||
@@ -1479,7 +1479,7 @@ void track_paint_util_right_quarter_turn_5_tiles_paint(
|
||||
}
|
||||
|
||||
void track_paint_util_right_quarter_turn_5_tiles_paint_2(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const sprite_bb sprites[][5])
|
||||
{
|
||||
int8_t sprite = right_quarter_turn_5_tiles_sprite_map[trackSequence];
|
||||
@@ -1498,7 +1498,7 @@ void track_paint_util_right_quarter_turn_5_tiles_paint_2(
|
||||
}
|
||||
|
||||
void track_paint_util_right_quarter_turn_5_tiles_paint_3(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const sprite_bb sprites[][5])
|
||||
{
|
||||
int8_t sprite = right_quarter_turn_5_tiles_sprite_map[trackSequence];
|
||||
@@ -1514,7 +1514,7 @@ void track_paint_util_right_quarter_turn_5_tiles_paint_3(
|
||||
}
|
||||
|
||||
void track_paint_util_right_quarter_turn_5_tiles_tunnel(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType)
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType)
|
||||
{
|
||||
if (direction == 0 && trackSequence == 0)
|
||||
{
|
||||
@@ -1535,7 +1535,7 @@ void track_paint_util_right_quarter_turn_5_tiles_tunnel(
|
||||
}
|
||||
|
||||
void track_paint_util_right_quarter_turn_5_tiles_wooden_supports(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence)
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence)
|
||||
{
|
||||
if (trackSequence != 1 && trackSequence != 4)
|
||||
{
|
||||
@@ -1546,7 +1546,7 @@ void track_paint_util_right_quarter_turn_5_tiles_wooden_supports(
|
||||
{ 1, 0xFF, 3, 5, 0xFF, 3, 0 },
|
||||
};
|
||||
uint8_t supportType = supportTypes[direction][trackSequence];
|
||||
wooden_a_supports_paint_setup(session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, supportType, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1634,7 +1634,7 @@ static constexpr const int8_t right_quarter_turn_3_tiles_sprite_map[] = {
|
||||
};
|
||||
|
||||
void track_paint_util_right_quarter_turn_3_tiles_paint(
|
||||
paint_session* session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const uint32_t sprites[4][3], const CoordsXY offsets[4][3], const CoordsXY boundsLengths[4][3],
|
||||
const CoordsXYZ boundsOffsets[4][3])
|
||||
{
|
||||
@@ -1655,7 +1655,7 @@ void track_paint_util_right_quarter_turn_3_tiles_paint(
|
||||
}
|
||||
|
||||
void track_paint_util_right_quarter_turn_3_tiles_paint_2(
|
||||
paint_session* session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const uint32_t sprites[4][3])
|
||||
{
|
||||
track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(
|
||||
@@ -1663,7 +1663,7 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2(
|
||||
}
|
||||
|
||||
void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(
|
||||
paint_session* session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const uint32_t sprites[4][3], int32_t heightOffset)
|
||||
{
|
||||
int8_t sprite = right_quarter_turn_3_tiles_sprite_map[trackSequence];
|
||||
@@ -1751,7 +1751,7 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(
|
||||
}
|
||||
|
||||
void track_paint_util_right_quarter_turn_3_tiles_paint_3(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const sprite_bb sprites[4][3])
|
||||
{
|
||||
int8_t sprite = right_quarter_turn_3_tiles_sprite_map[trackSequence];
|
||||
@@ -1768,7 +1768,7 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_3(
|
||||
}
|
||||
|
||||
void track_paint_util_right_quarter_turn_3_tiles_paint_4(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const sprite_bb sprites[4][3])
|
||||
{
|
||||
int8_t sprite = right_quarter_turn_3_tiles_sprite_map[trackSequence];
|
||||
@@ -1784,7 +1784,7 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_4(
|
||||
}
|
||||
|
||||
void track_paint_util_right_quarter_turn_3_tiles_tunnel(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType)
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType)
|
||||
{
|
||||
if (direction == 0 && trackSequence == 0)
|
||||
{
|
||||
@@ -1808,7 +1808,7 @@ void track_paint_util_right_quarter_turn_3_tiles_tunnel(
|
||||
}
|
||||
|
||||
void track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0,
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0,
|
||||
uint8_t tunnelType3)
|
||||
{
|
||||
if (direction == 0 && trackSequence == 0)
|
||||
@@ -1830,7 +1830,7 @@ void track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel(
|
||||
}
|
||||
|
||||
void track_paint_util_right_quarter_turn_3_tiles_25_deg_down_tunnel(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0,
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0,
|
||||
uint8_t tunnelType3)
|
||||
{
|
||||
if (direction == 0 && trackSequence == 0)
|
||||
@@ -1859,7 +1859,7 @@ static constexpr const int8_t left_quarter_turn_3_tiles_sprite_map[] = {
|
||||
};
|
||||
|
||||
void track_paint_util_left_quarter_turn_3_tiles_paint(
|
||||
paint_session* session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const uint32_t sprites[4][3])
|
||||
{
|
||||
track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(
|
||||
@@ -1867,7 +1867,7 @@ void track_paint_util_left_quarter_turn_3_tiles_paint(
|
||||
}
|
||||
|
||||
void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(
|
||||
paint_session* session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const uint32_t sprites[4][3], int32_t heightOffset)
|
||||
{
|
||||
int8_t sprite = left_quarter_turn_3_tiles_sprite_map[trackSequence];
|
||||
@@ -1955,7 +1955,7 @@ void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(
|
||||
}
|
||||
|
||||
void track_paint_util_left_quarter_turn_3_tiles_tunnel(
|
||||
paint_session* session, int16_t height, uint8_t tunnelType, Direction direction, uint8_t trackSequence)
|
||||
paint_session& session, int16_t height, uint8_t tunnelType, Direction direction, uint8_t trackSequence)
|
||||
{
|
||||
if (direction == 0 && trackSequence == 0)
|
||||
{
|
||||
@@ -1979,7 +1979,7 @@ void track_paint_util_left_quarter_turn_3_tiles_tunnel(
|
||||
}
|
||||
|
||||
void track_paint_util_left_quarter_turn_1_tile_paint(
|
||||
paint_session* session, int8_t thickness, int16_t height, int16_t boundBoxZOffset, Direction direction,
|
||||
paint_session& session, int8_t thickness, int16_t height, int16_t boundBoxZOffset, Direction direction,
|
||||
uint32_t colourFlags, const uint32_t* sprites)
|
||||
{
|
||||
uint32_t imageId = sprites[direction] | colourFlags;
|
||||
@@ -2006,7 +2006,7 @@ void track_paint_util_left_quarter_turn_1_tile_paint(
|
||||
}
|
||||
|
||||
void track_paint_util_right_quarter_turn_1_tile_tunnel(
|
||||
paint_session* session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset,
|
||||
paint_session& session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset,
|
||||
uint8_t endTunnel)
|
||||
{
|
||||
track_paint_util_left_quarter_turn_1_tile_tunnel(
|
||||
@@ -2014,7 +2014,7 @@ void track_paint_util_right_quarter_turn_1_tile_tunnel(
|
||||
}
|
||||
|
||||
void track_paint_util_left_quarter_turn_1_tile_tunnel(
|
||||
paint_session* session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset,
|
||||
paint_session& session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset,
|
||||
uint8_t endTunnel)
|
||||
{
|
||||
switch (direction)
|
||||
@@ -2032,12 +2032,12 @@ void track_paint_util_left_quarter_turn_1_tile_tunnel(
|
||||
}
|
||||
}
|
||||
|
||||
void track_paint_util_spinning_tunnel_paint(paint_session* session, int8_t thickness, int16_t height, Direction direction)
|
||||
void track_paint_util_spinning_tunnel_paint(paint_session& session, int8_t thickness, int16_t height, Direction direction)
|
||||
{
|
||||
int32_t frame = gCurrentTicks >> 2 & 3;
|
||||
uint32_t colourFlags = session->TrackColours[SCHEME_SUPPORTS];
|
||||
uint32_t colourFlags = session.TrackColours[SCHEME_SUPPORTS];
|
||||
|
||||
uint32_t colourFlags2 = session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t colourFlags2 = session.TrackColours[SCHEME_TRACK];
|
||||
if (colourFlags2 & IMAGE_TYPE_REMAP_2_PLUS)
|
||||
{
|
||||
colourFlags |= colourFlags2 & (IMAGE_TYPE_REMAP_2_PLUS | (0x1F << 24));
|
||||
@@ -2065,7 +2065,7 @@ void track_paint_util_spinning_tunnel_paint(paint_session* session, int8_t thick
|
||||
}
|
||||
|
||||
void track_paint_util_onride_photo_small_paint(
|
||||
paint_session* session, Direction direction, int32_t height, const TrackElement& trackElement)
|
||||
paint_session& session, Direction direction, int32_t height, const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][3] = {
|
||||
{ SPR_ON_RIDE_PHOTO_SIGN_SMALL_SW_NE, SPR_ON_RIDE_PHOTO_CAMERA_SMALL_S, SPR_ON_RIDE_PHOTO_CAMERA_FLASH_SMALL_S },
|
||||
@@ -2075,8 +2075,8 @@ void track_paint_util_onride_photo_small_paint(
|
||||
};
|
||||
|
||||
bool takingPhoto = trackElement.IsTakingPhoto();
|
||||
uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_MISC];
|
||||
uint32_t flashImageId = imageIds[direction][takingPhoto ? 2 : 1] | session->TrackColours[SCHEME_MISC];
|
||||
uint32_t imageId = imageIds[direction][0] | session.TrackColours[SCHEME_MISC];
|
||||
uint32_t flashImageId = imageIds[direction][takingPhoto ? 2 : 1] | session.TrackColours[SCHEME_MISC];
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
@@ -2103,7 +2103,7 @@ void track_paint_util_onride_photo_small_paint(
|
||||
}
|
||||
|
||||
void track_paint_util_onride_photo_paint(
|
||||
paint_session* session, Direction direction, int32_t height, const TrackElement& trackElement)
|
||||
paint_session& session, Direction direction, int32_t height, const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][3] = {
|
||||
{ SPR_ON_RIDE_PHOTO_SIGN_SW_NE, SPR_ON_RIDE_PHOTO_CAMERA_S, SPR_ON_RIDE_PHOTO_CAMERA_FLASH_S },
|
||||
@@ -2113,8 +2113,8 @@ void track_paint_util_onride_photo_paint(
|
||||
};
|
||||
|
||||
bool takingPhoto = trackElement.IsTakingPhoto();
|
||||
uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_MISC];
|
||||
uint32_t flashImageId = imageIds[direction][takingPhoto ? 2 : 1] | session->TrackColours[SCHEME_MISC];
|
||||
uint32_t imageId = imageIds[direction][0] | session.TrackColours[SCHEME_MISC];
|
||||
uint32_t flashImageId = imageIds[direction][takingPhoto ? 2 : 1] | session.TrackColours[SCHEME_MISC];
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
@@ -2153,7 +2153,7 @@ static constexpr const uint16_t RightVerticalLoopSegments[] = {
|
||||
SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0,
|
||||
};
|
||||
|
||||
void track_paint_util_right_vertical_loop_segments(paint_session* session, Direction direction, uint8_t trackSequence)
|
||||
void track_paint_util_right_vertical_loop_segments(paint_session& session, Direction direction, uint8_t trackSequence)
|
||||
{
|
||||
if (trackSequence > 9)
|
||||
{
|
||||
@@ -2165,7 +2165,7 @@ void track_paint_util_right_vertical_loop_segments(paint_session* session, Direc
|
||||
session, paint_util_rotate_segments(RightVerticalLoopSegments[trackSequence], direction), 0xFFFF, 0);
|
||||
}
|
||||
|
||||
void track_paint_util_left_corkscrew_up_supports(paint_session* session, Direction direction, uint16_t height)
|
||||
void track_paint_util_left_corkscrew_up_supports(paint_session& session, Direction direction, uint16_t height)
|
||||
{
|
||||
// TODO: Figure out which of these looks best, and use one to keep a consistent world
|
||||
if (direction == 2)
|
||||
@@ -2174,7 +2174,7 @@ void track_paint_util_left_corkscrew_up_supports(paint_session* session, Directi
|
||||
session, paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction),
|
||||
0xFFFF, 0);
|
||||
}
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
if (direction != 2)
|
||||
{
|
||||
paint_util_set_segment_support_height(
|
||||
@@ -2187,7 +2187,7 @@ void track_paint_util_left_corkscrew_up_supports(paint_session* session, Directi
|
||||
*
|
||||
* rct2: 0x006C4794
|
||||
*/
|
||||
void PaintTrack(paint_session* session, Direction direction, int32_t height, const TrackElement& trackElement)
|
||||
void PaintTrack(paint_session& session, Direction direction, int32_t height, const TrackElement& trackElement)
|
||||
{
|
||||
ride_id_t rideIndex = trackElement.GetRideIndex();
|
||||
auto ride = get_ride(rideIndex);
|
||||
@@ -2198,7 +2198,7 @@ void PaintTrack(paint_session* session, Direction direction, int32_t height, con
|
||||
}
|
||||
|
||||
if ((!gTrackDesignSaveMode || rideIndex == gTrackDesignSaveRideIndex)
|
||||
&& !(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
&& !(session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
{
|
||||
auto trackType = trackElement.GetTrackType();
|
||||
int32_t trackSequence = trackElement.GetSequenceIndex();
|
||||
@@ -2206,7 +2206,7 @@ void PaintTrack(paint_session* session, Direction direction, int32_t height, con
|
||||
|
||||
if (PaintShouldShowHeightMarkers(session, VIEWPORT_FLAG_TRACK_HEIGHTS))
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
const auto& ted = GetTrackElementDescriptor(trackType);
|
||||
if (ted.HeightMarkerPositions & (1 << trackSequence))
|
||||
{
|
||||
@@ -2229,33 +2229,33 @@ void PaintTrack(paint_session* session, Direction direction, int32_t height, con
|
||||
zOffset = 23;
|
||||
|
||||
if (ride->type == RIDE_TYPE_INFORMATION_KIOSK)
|
||||
LightFxAddKioskLights(session->MapPosition, height, zOffset);
|
||||
LightFxAddKioskLights(session.MapPosition, height, zOffset);
|
||||
else if (RideTypeDescriptors[ride->type].HasFlag(RIDE_TYPE_FLAG_IS_SHOP))
|
||||
LightFxAddShopLights(session->MapPosition, trackElement.GetDirection(), height, zOffset);
|
||||
LightFxAddShopLights(session.MapPosition, trackElement.GetDirection(), height, zOffset);
|
||||
}
|
||||
#endif
|
||||
|
||||
session->InteractionType = ViewportInteractionItem::Ride;
|
||||
session->TrackColours[SCHEME_TRACK] = SPRITE_ID_PALETTE_COLOUR_2(
|
||||
session.InteractionType = ViewportInteractionItem::Ride;
|
||||
session.TrackColours[SCHEME_TRACK] = SPRITE_ID_PALETTE_COLOUR_2(
|
||||
ride->track_colour[trackColourScheme].main, ride->track_colour[trackColourScheme].additional);
|
||||
session->TrackColours[SCHEME_SUPPORTS] = SPRITE_ID_PALETTE_COLOUR_1(ride->track_colour[trackColourScheme].supports);
|
||||
session->TrackColours[SCHEME_MISC] = IMAGE_TYPE_REMAP;
|
||||
session->TrackColours[SCHEME_3] = 0x20C00000;
|
||||
session.TrackColours[SCHEME_SUPPORTS] = SPRITE_ID_PALETTE_COLOUR_1(ride->track_colour[trackColourScheme].supports);
|
||||
session.TrackColours[SCHEME_MISC] = IMAGE_TYPE_REMAP;
|
||||
session.TrackColours[SCHEME_3] = 0x20C00000;
|
||||
if (trackElement.IsHighlighted())
|
||||
{
|
||||
session->TrackColours[SCHEME_TRACK] = 0x21600000;
|
||||
session->TrackColours[SCHEME_SUPPORTS] = 0x21600000;
|
||||
session->TrackColours[SCHEME_MISC] = 0x21600000;
|
||||
session->TrackColours[SCHEME_3] = 0x21600000;
|
||||
session.TrackColours[SCHEME_TRACK] = 0x21600000;
|
||||
session.TrackColours[SCHEME_SUPPORTS] = 0x21600000;
|
||||
session.TrackColours[SCHEME_MISC] = 0x21600000;
|
||||
session.TrackColours[SCHEME_3] = 0x21600000;
|
||||
}
|
||||
if (trackElement.IsGhost())
|
||||
{
|
||||
uint32_t ghost_id = CONSTRUCTION_MARKER;
|
||||
session->InteractionType = ViewportInteractionItem::None;
|
||||
session->TrackColours[SCHEME_TRACK] = ghost_id;
|
||||
session->TrackColours[SCHEME_SUPPORTS] = ghost_id;
|
||||
session->TrackColours[SCHEME_MISC] = ghost_id;
|
||||
session->TrackColours[SCHEME_3] = ghost_id;
|
||||
session.InteractionType = ViewportInteractionItem::None;
|
||||
session.TrackColours[SCHEME_TRACK] = ghost_id;
|
||||
session.TrackColours[SCHEME_SUPPORTS] = ghost_id;
|
||||
session.TrackColours[SCHEME_MISC] = ghost_id;
|
||||
session.TrackColours[SCHEME_3] = ghost_id;
|
||||
}
|
||||
|
||||
if (ride->type >= RIDE_TYPE_COUNT)
|
||||
|
||||
@@ -282,122 +282,122 @@ extern const size_t mini_golf_peep_animation_lengths[];
|
||||
bool track_paint_util_has_fence(
|
||||
enum edge_t edge, const CoordsXY& position, const TrackElement& trackElement, const Ride& ride, uint8_t rotation);
|
||||
void track_paint_util_paint_floor(
|
||||
paint_session* session, uint8_t edges, uint32_t colourFlags, uint16_t height, const uint32_t floorSprites[4],
|
||||
paint_session& session, uint8_t edges, uint32_t colourFlags, uint16_t height, const uint32_t floorSprites[4],
|
||||
const StationObject* stationStyle);
|
||||
void track_paint_util_paint_fences(
|
||||
paint_session* session, uint8_t edges, const CoordsXY& position, const TrackElement& trackElement, const Ride& ride,
|
||||
paint_session& session, uint8_t edges, const CoordsXY& position, const TrackElement& trackElement, const Ride& ride,
|
||||
uint32_t colourFlags, uint16_t height, const uint32_t fenceSprites[4], uint8_t rotation);
|
||||
bool track_paint_util_draw_station_covers(
|
||||
paint_session* session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height);
|
||||
paint_session& session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height);
|
||||
bool track_paint_util_draw_station_covers_2(
|
||||
paint_session* session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height,
|
||||
paint_session& session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height,
|
||||
uint8_t stationVariant);
|
||||
void track_paint_util_draw_narrow_station_platform(
|
||||
paint_session* session, const Ride& ride, Direction direction, int32_t height, int32_t zOffset,
|
||||
paint_session& session, const Ride& ride, Direction direction, int32_t height, int32_t zOffset,
|
||||
const TrackElement& trackElement);
|
||||
void track_paint_util_draw_station(
|
||||
paint_session* session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement);
|
||||
paint_session& session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement);
|
||||
void track_paint_util_draw_station_2(
|
||||
paint_session* session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement,
|
||||
paint_session& session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement,
|
||||
int32_t fenceOffsetA, int32_t fenceOffsetB);
|
||||
void track_paint_util_draw_station_3(
|
||||
paint_session* session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight,
|
||||
paint_session& session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight,
|
||||
const TrackElement& trackElement);
|
||||
void track_paint_util_draw_station_inverted(
|
||||
paint_session* session, const Ride& ride, Direction direction, int32_t height, const TrackElement& trackElement,
|
||||
paint_session& session, const Ride& ride, Direction direction, int32_t height, const TrackElement& trackElement,
|
||||
uint8_t stationVariant);
|
||||
bool track_paint_util_should_paint_supports(const CoordsXY& position);
|
||||
void track_paint_util_draw_pier(
|
||||
paint_session* session, const Ride& ride, const StationObject* stationObject, const CoordsXY& position, Direction direction,
|
||||
paint_session& session, const Ride& ride, const StationObject* stationObject, const CoordsXY& position, Direction direction,
|
||||
int32_t height, const TrackElement& trackElement, uint8_t rotation);
|
||||
void track_paint_util_draw_station_metal_supports(
|
||||
paint_session* session, Direction direction, uint16_t height, uint32_t colour);
|
||||
paint_session& session, Direction direction, uint16_t height, uint32_t colour);
|
||||
void track_paint_util_draw_station_metal_supports_2(
|
||||
paint_session* session, Direction direction, uint16_t height, uint32_t colour, uint8_t type);
|
||||
paint_session& session, Direction direction, uint16_t height, uint32_t colour, uint8_t type);
|
||||
|
||||
void track_paint_util_right_quarter_turn_5_tiles_paint(
|
||||
paint_session* session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const uint32_t sprites[4][5], const CoordsXY offsets[4][5], const CoordsXY boundsLengths[4][5],
|
||||
const CoordsXYZ boundsOffsets[4][5]);
|
||||
void track_paint_util_right_quarter_turn_5_tiles_paint_2(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const sprite_bb sprites[][5]);
|
||||
void track_paint_util_right_quarter_turn_5_tiles_paint_3(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const sprite_bb sprites[][5]);
|
||||
void track_paint_util_right_quarter_turn_5_tiles_tunnel(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType);
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType);
|
||||
void track_paint_util_right_quarter_turn_5_tiles_wooden_supports(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence);
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence);
|
||||
void track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0,
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0,
|
||||
uint8_t tunnelType3);
|
||||
void track_paint_util_right_quarter_turn_3_tiles_25_deg_down_tunnel(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0,
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0,
|
||||
uint8_t tunnelType3);
|
||||
void track_paint_util_right_quarter_turn_3_tiles_paint(
|
||||
paint_session* session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const uint32_t sprites[4][3], const CoordsXY offsets[4][3], const CoordsXY boundsLengths[4][3],
|
||||
const CoordsXYZ boundsOffsets[4][3]);
|
||||
void track_paint_util_right_quarter_turn_3_tiles_paint_2(
|
||||
paint_session* session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const uint32_t sprites[4][3]);
|
||||
void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(
|
||||
paint_session* session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const uint32_t sprites[4][3], int32_t heightOffset);
|
||||
void track_paint_util_right_quarter_turn_3_tiles_paint_3(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const sprite_bb sprites[4][3]);
|
||||
void track_paint_util_right_quarter_turn_3_tiles_paint_4(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const sprite_bb sprites[4][3]);
|
||||
void track_paint_util_right_quarter_turn_3_tiles_tunnel(
|
||||
paint_session* session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType);
|
||||
paint_session& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType);
|
||||
void track_paint_util_left_quarter_turn_3_tiles_paint(
|
||||
paint_session* session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const uint32_t sprites[4][3]);
|
||||
void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(
|
||||
paint_session* session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const uint32_t sprites[4][3], int32_t heightOffset);
|
||||
void track_paint_util_left_quarter_turn_3_tiles_tunnel(
|
||||
paint_session* session, int16_t height, uint8_t tunnelType, Direction direction, uint8_t trackSequence);
|
||||
paint_session& session, int16_t height, uint8_t tunnelType, Direction direction, uint8_t trackSequence);
|
||||
void track_paint_util_left_quarter_turn_1_tile_paint(
|
||||
paint_session* session, int8_t thickness, int16_t height, int16_t boundBoxZOffset, Direction direction,
|
||||
paint_session& session, int8_t thickness, int16_t height, int16_t boundBoxZOffset, Direction direction,
|
||||
uint32_t colourFlags, const uint32_t* sprites);
|
||||
void track_paint_util_spinning_tunnel_paint(paint_session* session, int8_t thickness, int16_t height, Direction direction);
|
||||
void track_paint_util_spinning_tunnel_paint(paint_session& session, int8_t thickness, int16_t height, Direction direction);
|
||||
void track_paint_util_onride_photo_small_paint(
|
||||
paint_session* session, Direction direction, int32_t height, const TrackElement& trackElement);
|
||||
paint_session& session, Direction direction, int32_t height, const TrackElement& trackElement);
|
||||
void track_paint_util_onride_photo_paint(
|
||||
paint_session* session, Direction direction, int32_t height, const TrackElement& trackElement);
|
||||
paint_session& session, Direction direction, int32_t height, const TrackElement& trackElement);
|
||||
void track_paint_util_right_helix_up_small_quarter_tiles_paint(
|
||||
paint_session* session, const int8_t thickness[2], int16_t height, Direction direction, uint8_t trackSequence,
|
||||
paint_session& session, const int8_t thickness[2], int16_t height, Direction direction, uint8_t trackSequence,
|
||||
uint32_t colourFlags, const uint32_t sprites[4][3][2], const CoordsXY offsets[4][3][2],
|
||||
const CoordsXY boundsLengths[4][3][2], const CoordsXYZ boundsOffsets[4][3][2]);
|
||||
void track_paint_util_right_helix_up_large_quarter_tiles_paint(
|
||||
paint_session* session, const int8_t thickness[2], int16_t height, Direction direction, uint8_t trackSequence,
|
||||
paint_session& session, const int8_t thickness[2], int16_t height, Direction direction, uint8_t trackSequence,
|
||||
uint32_t colourFlags, const uint32_t sprites[4][5][2], const CoordsXY offsets[4][5][2],
|
||||
const CoordsXY boundsLengths[4][5][2], const CoordsXYZ boundsOffsets[4][5][2]);
|
||||
void track_paint_util_eighth_to_diag_tiles_paint(
|
||||
paint_session* session, const int8_t thickness[4][4], int16_t height, Direction direction, uint8_t trackSequence,
|
||||
paint_session& session, const int8_t thickness[4][4], int16_t height, Direction direction, uint8_t trackSequence,
|
||||
uint32_t colourFlags, const uint32_t sprites[4][4], const CoordsXY offsets[4][4], const CoordsXY boundsLengths[4][4],
|
||||
const CoordsXYZ boundsOffsets[4][4]);
|
||||
void track_paint_util_diag_tiles_paint(
|
||||
paint_session* session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
paint_session& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, uint32_t colourFlags,
|
||||
const uint32_t sprites[4], const CoordsXY offsets[4], const CoordsXY boundsLengths[4], const CoordsXYZ boundsOffsets[4]);
|
||||
|
||||
void track_paint_util_left_quarter_turn_1_tile_tunnel(
|
||||
paint_session* session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset,
|
||||
paint_session& session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset,
|
||||
uint8_t endTunnel);
|
||||
void track_paint_util_right_quarter_turn_1_tile_tunnel(
|
||||
paint_session* session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset,
|
||||
paint_session& session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset,
|
||||
uint8_t endTunnel);
|
||||
|
||||
void track_paint_util_right_vertical_loop_segments(paint_session* session, Direction direction, uint8_t trackSequence);
|
||||
void track_paint_util_right_vertical_loop_segments(paint_session& session, Direction direction, uint8_t trackSequence);
|
||||
|
||||
void track_paint_util_left_corkscrew_up_supports(paint_session* session, Direction direction, uint16_t height);
|
||||
void track_paint_util_left_corkscrew_up_supports(paint_session& session, Direction direction, uint16_t height);
|
||||
|
||||
using TRACK_PAINT_FUNCTION = void (*)(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height,
|
||||
const TrackElement& trackElement);
|
||||
using TRACK_PAINT_FUNCTION_GETTER = TRACK_PAINT_FUNCTION (*)(int32_t trackType);
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ struct Vehicle : EntityBase
|
||||
}
|
||||
void ApplyMass(int16_t appliedMass);
|
||||
void Serialise(DataSerialiser& stream);
|
||||
void Paint(paint_session* session, int32_t imageDirection) const;
|
||||
void Paint(paint_session& session, int32_t imageDirection) const;
|
||||
|
||||
private:
|
||||
bool SoundCanPlay() const;
|
||||
|
||||
+100
-100
@@ -930,7 +930,7 @@ const vehicle_boundbox VehicleBoundboxes[16][224] = {
|
||||
};
|
||||
|
||||
static void PaintVehicleRiders(
|
||||
paint_session* session, const Vehicle* vehicle, const rct_ride_entry_vehicle* vehicleEntry, uint32_t baseImageId, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, const rct_ride_entry_vehicle* vehicleEntry, uint32_t baseImageId, int32_t z,
|
||||
const vehicle_boundbox& bb)
|
||||
{
|
||||
baseImageId += vehicleEntry->no_vehicle_images;
|
||||
@@ -962,7 +962,7 @@ static void PaintVehicleRiders(
|
||||
|
||||
// 6D5214
|
||||
static void vehicle_sprite_paint(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t ebx, int32_t ecx, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t ebx, int32_t ecx, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->draw_order >= std::size(VehicleBoundboxes))
|
||||
@@ -991,7 +991,7 @@ static void vehicle_sprite_paint(
|
||||
session, imageId, { 0, 0, z }, { bb.length_x, bb.length_y, bb.length_z },
|
||||
{ bb.offset_x, bb.offset_y, bb.offset_z + z });
|
||||
|
||||
auto* dpi = &session->DPI;
|
||||
auto* dpi = &session.DPI;
|
||||
if (dpi->zoom_level < ZoomLevel{ 2 } && vehicle->num_peeps > 0 && vehicleEntry->no_seating_rows > 0)
|
||||
{
|
||||
PaintVehicleRiders(session, vehicle, vehicleEntry, baseImageId, z, bb);
|
||||
@@ -1001,7 +1001,7 @@ static void vehicle_sprite_paint(
|
||||
|
||||
// 6D520E
|
||||
static void vehicle_sprite_paint_6D520E(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t ebx, int32_t ecx, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t ebx, int32_t ecx, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
vehicle_sprite_paint(session, vehicle, ebx + vehicle->SwingSprite, ecx, z, vehicleEntry);
|
||||
@@ -1009,7 +1009,7 @@ static void vehicle_sprite_paint_6D520E(
|
||||
|
||||
// 6D51EB
|
||||
static void vehicle_sprite_paint_6D51EB(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t ebx, int32_t z, const rct_ride_entry_vehicle* vehicleEntry)
|
||||
paint_session& session, const Vehicle* vehicle, int32_t ebx, int32_t z, const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
int32_t ecx = ebx / 2;
|
||||
if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_USE_16_ROTATION_FRAMES)
|
||||
@@ -1026,7 +1026,7 @@ static void vehicle_sprite_paint_6D51EB(
|
||||
|
||||
// 6D51DE
|
||||
static void vehicle_sprite_paint_6D51DE(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t ebx, int32_t z, const rct_ride_entry_vehicle* vehicleEntry)
|
||||
paint_session& session, const Vehicle* vehicle, int32_t ebx, int32_t z, const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->restraints_position < 64)
|
||||
{
|
||||
@@ -1053,7 +1053,7 @@ static void vehicle_sprite_paint_6D51DE(
|
||||
|
||||
// 6D51DE
|
||||
static void vehicle_sprite_0_0(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
vehicle_sprite_paint_6D51DE(session, vehicle, imageDirection, z, vehicleEntry);
|
||||
@@ -1061,7 +1061,7 @@ static void vehicle_sprite_0_0(
|
||||
|
||||
// 6D4EE7
|
||||
static void vehicle_sprite_0_1(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED)
|
||||
@@ -1078,7 +1078,7 @@ static void vehicle_sprite_0_1(
|
||||
|
||||
// 6D4F34
|
||||
static void vehicle_sprite_0_2(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED)
|
||||
@@ -1095,7 +1095,7 @@ static void vehicle_sprite_0_2(
|
||||
|
||||
// 6D4F0C
|
||||
static void vehicle_sprite_0_3(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED)
|
||||
@@ -1112,7 +1112,7 @@ static void vehicle_sprite_0_3(
|
||||
|
||||
// 6D4F5C
|
||||
static void vehicle_sprite_0_4(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED)
|
||||
@@ -1129,7 +1129,7 @@ static void vehicle_sprite_0_4(
|
||||
|
||||
// 6D4F84
|
||||
static void vehicle_sprite_0_5(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -1150,7 +1150,7 @@ static void vehicle_sprite_0_5(
|
||||
|
||||
// 6D4FE4
|
||||
static void vehicle_sprite_0_6(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -1171,7 +1171,7 @@ static void vehicle_sprite_0_6(
|
||||
|
||||
// 6D5055
|
||||
static void vehicle_sprite_0_7(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -1192,7 +1192,7 @@ static void vehicle_sprite_0_7(
|
||||
|
||||
// 6D50C6
|
||||
static void vehicle_sprite_0_8(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -1213,7 +1213,7 @@ static void vehicle_sprite_0_8(
|
||||
|
||||
// 6D5137
|
||||
static void vehicle_sprite_0_9(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -1234,7 +1234,7 @@ static void vehicle_sprite_0_9(
|
||||
|
||||
// 6D4FB1
|
||||
static void vehicle_sprite_0_10(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -1255,7 +1255,7 @@ static void vehicle_sprite_0_10(
|
||||
|
||||
// 6D501B
|
||||
static void vehicle_sprite_0_11(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -1276,7 +1276,7 @@ static void vehicle_sprite_0_11(
|
||||
|
||||
// 6D508C
|
||||
static void vehicle_sprite_0_12(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -1297,7 +1297,7 @@ static void vehicle_sprite_0_12(
|
||||
|
||||
// 6D50FD
|
||||
static void vehicle_sprite_0_13(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -1318,7 +1318,7 @@ static void vehicle_sprite_0_13(
|
||||
|
||||
// 6D516E
|
||||
static void vehicle_sprite_0_14(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -1339,7 +1339,7 @@ static void vehicle_sprite_0_14(
|
||||
|
||||
// 6D4EE4
|
||||
static void vehicle_sprite_0_16(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
vehicleEntry--;
|
||||
@@ -1357,7 +1357,7 @@ static void vehicle_sprite_0_16(
|
||||
|
||||
// 6D4F31
|
||||
static void vehicle_sprite_0_17(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
vehicleEntry--;
|
||||
@@ -1375,7 +1375,7 @@ static void vehicle_sprite_0_17(
|
||||
|
||||
// 6D4F09
|
||||
static void vehicle_sprite_0_18(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
vehicleEntry--;
|
||||
@@ -1393,7 +1393,7 @@ static void vehicle_sprite_0_18(
|
||||
|
||||
// 6D4F59
|
||||
static void vehicle_sprite_0_19(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
vehicleEntry--;
|
||||
@@ -1411,7 +1411,7 @@ static void vehicle_sprite_0_19(
|
||||
|
||||
// 6D51D7
|
||||
static void vehicle_sprite_0(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
// 0x009A3DE4:
|
||||
@@ -1482,7 +1482,7 @@ static void vehicle_sprite_0(
|
||||
|
||||
// 6D4614
|
||||
static void vehicle_sprite_1_0(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPES)
|
||||
@@ -1499,7 +1499,7 @@ static void vehicle_sprite_1_0(
|
||||
|
||||
// 6D4662
|
||||
static void vehicle_sprite_1_1(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_BANKED_TRANSITIONS)
|
||||
@@ -1516,7 +1516,7 @@ static void vehicle_sprite_1_1(
|
||||
|
||||
// 6D46DB
|
||||
static void vehicle_sprite_1_2(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS)
|
||||
@@ -1533,7 +1533,7 @@ static void vehicle_sprite_1_2(
|
||||
|
||||
// 6D467D
|
||||
static void vehicle_sprite_1_3(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_BANKED_TRANSITIONS)
|
||||
@@ -1550,7 +1550,7 @@ static void vehicle_sprite_1_3(
|
||||
|
||||
// 6D46FD
|
||||
static void vehicle_sprite_1_4(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS)
|
||||
@@ -1568,7 +1568,7 @@ static void vehicle_sprite_1_4(
|
||||
|
||||
// 6D460D
|
||||
static void vehicle_sprite_1(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
// 0x009A3C04:
|
||||
@@ -1639,7 +1639,7 @@ static void vehicle_sprite_1(
|
||||
|
||||
// 6D4791
|
||||
static void vehicle_sprite_2_0(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPES)
|
||||
@@ -1665,7 +1665,7 @@ static void vehicle_sprite_2_0(
|
||||
|
||||
// 6D4833
|
||||
static void vehicle_sprite_2_1(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS)
|
||||
@@ -1682,7 +1682,7 @@ static void vehicle_sprite_2_1(
|
||||
|
||||
// 6D48D6
|
||||
static void vehicle_sprite_2_2(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TURNS)
|
||||
@@ -1709,7 +1709,7 @@ static void vehicle_sprite_2_2(
|
||||
|
||||
// 6D4858
|
||||
static void vehicle_sprite_2_3(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS)
|
||||
@@ -1727,7 +1727,7 @@ static void vehicle_sprite_2_3(
|
||||
|
||||
// 6D4910
|
||||
static void vehicle_sprite_2_4(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TURNS)
|
||||
@@ -1756,7 +1756,7 @@ static void vehicle_sprite_2_4(
|
||||
|
||||
// 6D476C
|
||||
static void vehicle_sprite_2(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
// 0x009A3CA4:
|
||||
@@ -1827,7 +1827,7 @@ static void vehicle_sprite_2(
|
||||
|
||||
// 6D49DC
|
||||
static void vehicle_sprite_3(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (!(vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_STEEP_SLOPES))
|
||||
@@ -1844,7 +1844,7 @@ static void vehicle_sprite_3(
|
||||
|
||||
// 6D4A31
|
||||
static void vehicle_sprite_4(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (!(vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_STEEP_SLOPES))
|
||||
@@ -1861,7 +1861,7 @@ static void vehicle_sprite_4(
|
||||
|
||||
// 6D463D
|
||||
static void vehicle_sprite_5_0(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPES)
|
||||
@@ -1878,7 +1878,7 @@ static void vehicle_sprite_5_0(
|
||||
|
||||
// 6D469B
|
||||
static void vehicle_sprite_5_1(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_BANKED_TRANSITIONS)
|
||||
@@ -1895,7 +1895,7 @@ static void vehicle_sprite_5_1(
|
||||
|
||||
// 6D4722
|
||||
static void vehicle_sprite_5_2(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS)
|
||||
@@ -1913,7 +1913,7 @@ static void vehicle_sprite_5_2(
|
||||
|
||||
// 6D46B9
|
||||
static void vehicle_sprite_5_3(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_BANKED_TRANSITIONS)
|
||||
@@ -1930,7 +1930,7 @@ static void vehicle_sprite_5_3(
|
||||
|
||||
// 6D4747
|
||||
static void vehicle_sprite_5_4(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS)
|
||||
@@ -1948,7 +1948,7 @@ static void vehicle_sprite_5_4(
|
||||
|
||||
// 6D4636
|
||||
static void vehicle_sprite_5(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
// 0x009A3C54:
|
||||
@@ -2019,7 +2019,7 @@ static void vehicle_sprite_5(
|
||||
|
||||
// 6D47E4
|
||||
static void vehicle_sprite_6_0(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPES)
|
||||
@@ -2045,7 +2045,7 @@ static void vehicle_sprite_6_0(
|
||||
|
||||
// 6D4880
|
||||
static void vehicle_sprite_6_1(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS)
|
||||
@@ -2063,7 +2063,7 @@ static void vehicle_sprite_6_1(
|
||||
|
||||
// 6D4953
|
||||
static void vehicle_sprite_6_2(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TURNS)
|
||||
@@ -2092,7 +2092,7 @@ static void vehicle_sprite_6_2(
|
||||
|
||||
// 6D48AB
|
||||
static void vehicle_sprite_6_3(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS)
|
||||
@@ -2110,7 +2110,7 @@ static void vehicle_sprite_6_3(
|
||||
|
||||
// 6D4996
|
||||
static void vehicle_sprite_6_4(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TURNS)
|
||||
@@ -2139,7 +2139,7 @@ static void vehicle_sprite_6_4(
|
||||
|
||||
// 6D47DD
|
||||
static void vehicle_sprite_6(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
// 0x009A3CF4:
|
||||
@@ -2210,7 +2210,7 @@ static void vehicle_sprite_6(
|
||||
|
||||
// 6D4A05
|
||||
static void vehicle_sprite_7(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_STEEP_SLOPES)
|
||||
@@ -2227,7 +2227,7 @@ static void vehicle_sprite_7(
|
||||
|
||||
// 6D4A59
|
||||
static void vehicle_sprite_8(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_STEEP_SLOPES)
|
||||
@@ -2244,7 +2244,7 @@ static void vehicle_sprite_8(
|
||||
|
||||
// 6D4A81
|
||||
static void vehicle_sprite_9(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES)
|
||||
@@ -2261,7 +2261,7 @@ static void vehicle_sprite_9(
|
||||
|
||||
// 6D4AE8
|
||||
static void vehicle_sprite_10(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES)
|
||||
@@ -2278,7 +2278,7 @@ static void vehicle_sprite_10(
|
||||
|
||||
// 6D4B57
|
||||
static void vehicle_sprite_11(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES)
|
||||
@@ -2295,7 +2295,7 @@ static void vehicle_sprite_11(
|
||||
|
||||
// 6D4BB7
|
||||
static void vehicle_sprite_12(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES)
|
||||
@@ -2312,7 +2312,7 @@ static void vehicle_sprite_12(
|
||||
|
||||
// 6D4C17
|
||||
static void vehicle_sprite_13(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES)
|
||||
@@ -2329,7 +2329,7 @@ static void vehicle_sprite_13(
|
||||
|
||||
// 6D4C77
|
||||
static void vehicle_sprite_14(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES)
|
||||
@@ -2346,7 +2346,7 @@ static void vehicle_sprite_14(
|
||||
|
||||
// 6D4CD7
|
||||
static void vehicle_sprite_15(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES)
|
||||
@@ -2363,7 +2363,7 @@ static void vehicle_sprite_15(
|
||||
|
||||
// 6D4D37
|
||||
static void vehicle_sprite_16(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES)
|
||||
@@ -2380,7 +2380,7 @@ static void vehicle_sprite_16(
|
||||
|
||||
// 6D4AA3
|
||||
static void vehicle_sprite_17(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -2405,7 +2405,7 @@ static void vehicle_sprite_17(
|
||||
|
||||
// 6D4B0D
|
||||
static void vehicle_sprite_18(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -2430,7 +2430,7 @@ static void vehicle_sprite_18(
|
||||
|
||||
// 6D4B80
|
||||
static void vehicle_sprite_19(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -2451,7 +2451,7 @@ static void vehicle_sprite_19(
|
||||
|
||||
// 6D4BE0
|
||||
static void vehicle_sprite_20(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -2472,7 +2472,7 @@ static void vehicle_sprite_20(
|
||||
|
||||
// 6D4C40
|
||||
static void vehicle_sprite_21(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -2493,7 +2493,7 @@ static void vehicle_sprite_21(
|
||||
|
||||
// 6D4CA0
|
||||
static void vehicle_sprite_22(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -2514,7 +2514,7 @@ static void vehicle_sprite_22(
|
||||
|
||||
// 6D4D00
|
||||
static void vehicle_sprite_23(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -2535,7 +2535,7 @@ static void vehicle_sprite_23(
|
||||
|
||||
// 6D51A5
|
||||
static void vehicle_sprite_24(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES))
|
||||
@@ -2557,7 +2557,7 @@ static void vehicle_sprite_24(
|
||||
|
||||
// 6D4D67
|
||||
static void vehicle_sprite_50_0(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES)
|
||||
@@ -2574,7 +2574,7 @@ static void vehicle_sprite_50_0(
|
||||
|
||||
// 6D4DB5
|
||||
static void vehicle_sprite_50_1(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_GENTLE_SLOPE_BANKED_TRANSITIONS)
|
||||
@@ -2592,7 +2592,7 @@ static void vehicle_sprite_50_1(
|
||||
|
||||
// 6D4DD3
|
||||
static void vehicle_sprite_50_3(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_GENTLE_SLOPE_BANKED_TRANSITIONS)
|
||||
@@ -2610,7 +2610,7 @@ static void vehicle_sprite_50_3(
|
||||
|
||||
// 6D4D60
|
||||
static void vehicle_sprite_50(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
// 0x009A3D44:
|
||||
@@ -2681,7 +2681,7 @@ static void vehicle_sprite_50(
|
||||
|
||||
// 6D4E3A
|
||||
static void vehicle_sprite_51(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES)
|
||||
@@ -2698,7 +2698,7 @@ static void vehicle_sprite_51(
|
||||
|
||||
// 6D4E8F
|
||||
static void vehicle_sprite_52(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES)
|
||||
@@ -2715,7 +2715,7 @@ static void vehicle_sprite_52(
|
||||
|
||||
// 6D4D90
|
||||
static void vehicle_sprite_53_0(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES)
|
||||
@@ -2732,7 +2732,7 @@ static void vehicle_sprite_53_0(
|
||||
|
||||
// 6D4DF4
|
||||
static void vehicle_sprite_53_1(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_GENTLE_SLOPE_BANKED_TRANSITIONS)
|
||||
@@ -2750,7 +2750,7 @@ static void vehicle_sprite_53_1(
|
||||
|
||||
// 6D4E15
|
||||
static void vehicle_sprite_53_3(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_GENTLE_SLOPE_BANKED_TRANSITIONS)
|
||||
@@ -2768,7 +2768,7 @@ static void vehicle_sprite_53_3(
|
||||
|
||||
// 6D4D89
|
||||
static void vehicle_sprite_53(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
// 0x009A3D94:
|
||||
@@ -2839,7 +2839,7 @@ static void vehicle_sprite_53(
|
||||
|
||||
// 6D4E63
|
||||
static void vehicle_sprite_54(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES)
|
||||
@@ -2856,7 +2856,7 @@ static void vehicle_sprite_54(
|
||||
|
||||
// 6D4EB8
|
||||
static void vehicle_sprite_55(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES)
|
||||
@@ -2873,7 +2873,7 @@ static void vehicle_sprite_55(
|
||||
|
||||
// 6D47DA
|
||||
static void vehicle_sprite_56(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
vehicleEntry--;
|
||||
@@ -2882,7 +2882,7 @@ static void vehicle_sprite_56(
|
||||
|
||||
// 6D4A02
|
||||
static void vehicle_sprite_57(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
vehicleEntry--;
|
||||
@@ -2900,7 +2900,7 @@ static void vehicle_sprite_57(
|
||||
|
||||
// 6D4A56
|
||||
static void vehicle_sprite_58(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
vehicleEntry--;
|
||||
@@ -2918,7 +2918,7 @@ static void vehicle_sprite_58(
|
||||
|
||||
// 6D4773
|
||||
static void vehicle_sprite_59(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_CURVED_LIFT_HILL)
|
||||
@@ -2935,7 +2935,7 @@ static void vehicle_sprite_59(
|
||||
|
||||
// 0x009A3B14:
|
||||
using vehicle_sprite_func = void (*)(
|
||||
paint_session* session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
paint_session& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z,
|
||||
const rct_ride_entry_vehicle* vehicleEntry);
|
||||
|
||||
// clang-format off
|
||||
@@ -3007,7 +3007,7 @@ static constexpr const vehicle_sprite_func vehicle_sprite_funcs[] = {
|
||||
*
|
||||
* rct2: 0x006D5600
|
||||
*/
|
||||
static void vehicle_visual_splash1_effect(paint_session* session, int32_t z, const Vehicle* vehicle)
|
||||
static void vehicle_visual_splash1_effect(paint_session& session, int32_t z, const Vehicle* vehicle)
|
||||
{
|
||||
if (vehicle->GetTrackType() != TrackElemType::Watersplash)
|
||||
{
|
||||
@@ -3025,7 +3025,7 @@ static void vehicle_visual_splash1_effect(paint_session* session, int32_t z, con
|
||||
{
|
||||
return;
|
||||
}
|
||||
int32_t image_id = 29014 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8)
|
||||
int32_t image_id = 29014 + ((((vehicle->sprite_direction / 8) + session.CurrentRotation) & 3) * 8)
|
||||
+ ((gCurrentTicks / 2) & 7);
|
||||
PaintAddImageAsChild(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z);
|
||||
}
|
||||
@@ -3034,7 +3034,7 @@ static void vehicle_visual_splash1_effect(paint_session* session, int32_t z, con
|
||||
*
|
||||
* rct2: 0x006D5696
|
||||
*/
|
||||
static void vehicle_visual_splash2_effect(paint_session* session, int32_t z, const Vehicle* vehicle)
|
||||
static void vehicle_visual_splash2_effect(paint_session& session, int32_t z, const Vehicle* vehicle)
|
||||
{
|
||||
if (vehicle->sprite_direction & 7)
|
||||
{
|
||||
@@ -3048,7 +3048,7 @@ static void vehicle_visual_splash2_effect(paint_session* session, int32_t z, con
|
||||
{
|
||||
return;
|
||||
}
|
||||
int32_t image_id = 29046 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8)
|
||||
int32_t image_id = 29046 + ((((vehicle->sprite_direction / 8) + session.CurrentRotation) & 3) * 8)
|
||||
+ ((gCurrentTicks / 2) & 7);
|
||||
PaintAddImageAsChild(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z);
|
||||
}
|
||||
@@ -3057,7 +3057,7 @@ static void vehicle_visual_splash2_effect(paint_session* session, int32_t z, con
|
||||
*
|
||||
* rct2: 0x006D57EE
|
||||
*/
|
||||
static void vehicle_visual_splash3_effect(paint_session* session, int32_t z, const Vehicle* vehicle)
|
||||
static void vehicle_visual_splash3_effect(paint_session& session, int32_t z, const Vehicle* vehicle)
|
||||
{
|
||||
if (vehicle->sprite_direction & 7)
|
||||
{
|
||||
@@ -3071,7 +3071,7 @@ static void vehicle_visual_splash3_effect(paint_session* session, int32_t z, con
|
||||
{
|
||||
return;
|
||||
}
|
||||
int32_t image_id = 29014 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8)
|
||||
int32_t image_id = 29014 + ((((vehicle->sprite_direction / 8) + session.CurrentRotation) & 3) * 8)
|
||||
+ ((gCurrentTicks / 2) & 7);
|
||||
PaintAddImageAsChild(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z);
|
||||
}
|
||||
@@ -3080,7 +3080,7 @@ static void vehicle_visual_splash3_effect(paint_session* session, int32_t z, con
|
||||
*
|
||||
* rct2: 0x006D5783
|
||||
*/
|
||||
static void vehicle_visual_splash4_effect(paint_session* session, int32_t z, const Vehicle* vehicle)
|
||||
static void vehicle_visual_splash4_effect(paint_session& session, int32_t z, const Vehicle* vehicle)
|
||||
{
|
||||
Vehicle* vehicle2 = GetEntity<Vehicle>(vehicle->prev_vehicle_on_ride);
|
||||
if (vehicle2 == nullptr)
|
||||
@@ -3099,7 +3099,7 @@ static void vehicle_visual_splash4_effect(paint_session* session, int32_t z, con
|
||||
{
|
||||
return;
|
||||
}
|
||||
int32_t image_id = 29078 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8)
|
||||
int32_t image_id = 29078 + ((((vehicle->sprite_direction / 8) + session.CurrentRotation) & 3) * 8)
|
||||
+ ((gCurrentTicks / 2) & 7);
|
||||
PaintAddImageAsChild(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z);
|
||||
}
|
||||
@@ -3108,7 +3108,7 @@ static void vehicle_visual_splash4_effect(paint_session* session, int32_t z, con
|
||||
*
|
||||
* rct2: 0x006D5701
|
||||
*/
|
||||
static void vehicle_visual_splash5_effect(paint_session* session, int32_t z, const Vehicle* vehicle)
|
||||
static void vehicle_visual_splash5_effect(paint_session& session, int32_t z, const Vehicle* vehicle)
|
||||
{
|
||||
Vehicle* vehicle2 = GetEntity<Vehicle>(vehicle->prev_vehicle_on_ride);
|
||||
if (vehicle2 == nullptr)
|
||||
@@ -3131,13 +3131,13 @@ static void vehicle_visual_splash5_effect(paint_session* session, int32_t z, con
|
||||
{
|
||||
return;
|
||||
}
|
||||
int32_t image_id = 29078 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8)
|
||||
int32_t image_id = 29078 + ((((vehicle->sprite_direction / 8) + session.CurrentRotation) & 3) * 8)
|
||||
+ ((gCurrentTicks / 2) & 7);
|
||||
PaintAddImageAsChild(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z);
|
||||
}
|
||||
|
||||
void vehicle_visual_splash_effect(
|
||||
paint_session* session, int32_t z, const Vehicle* vehicle, const rct_ride_entry_vehicle* vehicleEntry)
|
||||
paint_session& session, int32_t z, const Vehicle* vehicle, const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
switch (vehicleEntry->effect_visual)
|
||||
{
|
||||
@@ -3164,7 +3164,7 @@ void vehicle_visual_splash_effect(
|
||||
* rct2: 0x006D45F8
|
||||
*/
|
||||
void vehicle_visual_default(
|
||||
paint_session* session, int32_t imageDirection, int32_t z, const Vehicle* vehicle,
|
||||
paint_session& session, int32_t imageDirection, int32_t z, const Vehicle* vehicle,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
if (vehicle->Pitch < std::size(vehicle_sprite_funcs))
|
||||
@@ -3173,7 +3173,7 @@ void vehicle_visual_default(
|
||||
}
|
||||
}
|
||||
|
||||
void Vehicle::Paint(paint_session* session, int32_t imageDirection) const
|
||||
void Vehicle::Paint(paint_session& session, int32_t imageDirection) const
|
||||
{
|
||||
const rct_ride_entry_vehicle* vehicleEntry;
|
||||
|
||||
|
||||
@@ -28,35 +28,35 @@ struct vehicle_boundbox
|
||||
extern const vehicle_boundbox VehicleBoundboxes[16][224];
|
||||
|
||||
void vehicle_visual_default(
|
||||
paint_session* session, int32_t imageDirection, int32_t z, const Vehicle* vehicle,
|
||||
paint_session& session, int32_t imageDirection, int32_t z, const Vehicle* vehicle,
|
||||
const rct_ride_entry_vehicle* vehicleEntry);
|
||||
void vehicle_visual_roto_drop(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
const rct_ride_entry_vehicle* vehicleEntry);
|
||||
void vehicle_visual_observation_tower(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
const rct_ride_entry_vehicle* vehicleEntry);
|
||||
void vehicle_visual_river_rapids(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
const rct_ride_entry_vehicle* vehicleEntry);
|
||||
void vehicle_visual_reverser(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
const rct_ride_entry_vehicle* vehicleEntry);
|
||||
void vehicle_visual_splash_boats_or_water_coaster(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
const rct_ride_entry_vehicle* vehicleEntry);
|
||||
void vehicle_visual_launched_freefall(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
const rct_ride_entry_vehicle* vehicleEntry);
|
||||
void vehicle_visual_splash_effect(
|
||||
paint_session* session, int32_t z, const Vehicle* vehicle, const rct_ride_entry_vehicle* vehicleEntry);
|
||||
paint_session& session, int32_t z, const Vehicle* vehicle, const rct_ride_entry_vehicle* vehicleEntry);
|
||||
void vehicle_visual_virginia_reel(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
const rct_ride_entry_vehicle* vehicleEntry);
|
||||
void vehicle_visual_submarine(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
const rct_ride_entry_vehicle* vehicleEntry);
|
||||
void vehicle_visual_mini_golf_player(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle);
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle);
|
||||
void vehicle_visual_mini_golf_ball(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle);
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle);
|
||||
@@ -164,10 +164,10 @@ enum
|
||||
SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_SE_NE_PART_0 = 22333,
|
||||
};
|
||||
|
||||
static uint32_t air_powered_vertical_rc_get_support_colour(paint_session* session)
|
||||
static uint32_t air_powered_vertical_rc_get_support_colour(paint_session& session)
|
||||
{
|
||||
uint32_t colourFlags = session->TrackColours[SCHEME_SUPPORTS];
|
||||
uint32_t trackColour = session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t colourFlags = session.TrackColours[SCHEME_SUPPORTS];
|
||||
uint32_t trackColour = session.TrackColours[SCHEME_TRACK];
|
||||
if (trackColour & IMAGE_TYPE_REMAP_2_PLUS)
|
||||
{
|
||||
colourFlags |= (trackColour & 0x9F000000);
|
||||
@@ -177,7 +177,7 @@ static uint32_t air_powered_vertical_rc_get_support_colour(paint_session* sessio
|
||||
|
||||
/** rct2: 0x008AFAD4 */
|
||||
static void air_powered_vertical_rc_track_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4] = {
|
||||
@@ -187,10 +187,10 @@ static void air_powered_vertical_rc_track_flat(
|
||||
SPR_AIR_POWERED_VERTICAL_RC_FLAT_NW_SE,
|
||||
};
|
||||
|
||||
uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height);
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
|
||||
@@ -199,7 +199,7 @@ static void air_powered_vertical_rc_track_flat(
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_station(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][2] = {
|
||||
@@ -210,13 +210,12 @@ static void air_powered_vertical_rc_track_station(
|
||||
};
|
||||
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, imageIds[direction][1] | session->TrackColours[SCHEME_MISC], 0, 0, 32, 28, 1, height - 2, 0, 2,
|
||||
session, direction, imageIds[direction][1] | session.TrackColours[SCHEME_MISC], 0, 0, 32, 28, 1, height - 2, 0, 2,
|
||||
height);
|
||||
PaintAddImageAsChildRotated(
|
||||
session, direction, imageIds[direction][0] | session->TrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6,
|
||||
height);
|
||||
session, direction, imageIds[direction][0] | session.TrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height);
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
track_paint_util_draw_narrow_station_platform(session, ride, direction, height, 5, trackElement);
|
||||
|
||||
@@ -227,7 +226,7 @@ static void air_powered_vertical_rc_track_station(
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_right_quarter_turn_5(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const sprite_bb imageIds[4][5] = {
|
||||
@@ -262,7 +261,7 @@ static void air_powered_vertical_rc_track_right_quarter_turn_5(
|
||||
};
|
||||
|
||||
track_paint_util_right_quarter_turn_5_tiles_paint_3(
|
||||
session, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], imageIds);
|
||||
session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIds);
|
||||
track_paint_util_right_quarter_turn_5_tiles_wooden_supports(session, height, direction, trackSequence);
|
||||
track_paint_util_right_quarter_turn_5_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT);
|
||||
|
||||
@@ -310,7 +309,7 @@ static void air_powered_vertical_rc_track_right_quarter_turn_5(
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_left_quarter_turn_5(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence];
|
||||
@@ -319,7 +318,7 @@ static void air_powered_vertical_rc_track_left_quarter_turn_5(
|
||||
|
||||
/** rct2: 0x008AFB74 */
|
||||
static void air_powered_vertical_rc_track_flat_to_left_bank(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][2] = {
|
||||
@@ -329,16 +328,16 @@ static void air_powered_vertical_rc_track_flat_to_left_bank(
|
||||
{ SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_SE_NW, SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_FRONT_SE_NW },
|
||||
};
|
||||
|
||||
uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
|
||||
if (direction == 0 || direction == 1)
|
||||
{
|
||||
imageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = imageIds[direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 1, 26, height, 0, 27, height);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
|
||||
@@ -348,7 +347,7 @@ static void air_powered_vertical_rc_track_flat_to_left_bank(
|
||||
|
||||
/** rct2: 0x008AFB84 */
|
||||
static void air_powered_vertical_rc_track_flat_to_right_bank(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][2] = {
|
||||
@@ -358,16 +357,16 @@ static void air_powered_vertical_rc_track_flat_to_right_bank(
|
||||
{ SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_RIGHT_BANK_SE_NW, SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_FRONT_SE_NW },
|
||||
};
|
||||
|
||||
uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
|
||||
if (direction == 2 || direction == 3)
|
||||
{
|
||||
imageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = imageIds[direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 1, 26, height, 0, 27, height);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
|
||||
@@ -376,7 +375,7 @@ static void air_powered_vertical_rc_track_flat_to_right_bank(
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_left_bank_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
air_powered_vertical_rc_track_flat_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -384,14 +383,14 @@ static void air_powered_vertical_rc_track_left_bank_to_flat(
|
||||
|
||||
/** rct2: 0x008AFBA4 */
|
||||
static void air_powered_vertical_rc_track_right_bank_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
air_powered_vertical_rc_track_flat_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_banked_right_quarter_turn_5(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const sprite_bb imageIds[4][5] = {
|
||||
@@ -426,18 +425,18 @@ static void air_powered_vertical_rc_track_banked_right_quarter_turn_5(
|
||||
};
|
||||
|
||||
track_paint_util_right_quarter_turn_5_tiles_paint_2(
|
||||
session, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], imageIds);
|
||||
session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIds);
|
||||
|
||||
if (direction == 1 && trackSequence == 6)
|
||||
{
|
||||
uint32_t imageId = SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_NW_SW_PART_4
|
||||
| session->TrackColours[SCHEME_TRACK];
|
||||
| session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height });
|
||||
}
|
||||
else if (direction == 3 && trackSequence == 0)
|
||||
{
|
||||
uint32_t imageId = SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_SE_NE_PART_0
|
||||
| session->TrackColours[SCHEME_TRACK];
|
||||
| session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height });
|
||||
}
|
||||
|
||||
@@ -488,7 +487,7 @@ static void air_powered_vertical_rc_track_banked_right_quarter_turn_5(
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_banked_left_quarter_turn_5(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence];
|
||||
@@ -498,7 +497,7 @@ static void air_powered_vertical_rc_track_banked_left_quarter_turn_5(
|
||||
|
||||
/** rct2: 0x008AFBD4 */
|
||||
static void air_powered_vertical_rc_track_left_bank(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4] = {
|
||||
@@ -508,7 +507,7 @@ static void air_powered_vertical_rc_track_left_bank(
|
||||
SPR_AIR_POWERED_VERTICAL_RC_LEFT_BANK_SE_NW,
|
||||
};
|
||||
|
||||
uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 1)
|
||||
{
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 1, 26, height, 0, 27, height);
|
||||
@@ -518,7 +517,7 @@ static void air_powered_vertical_rc_track_left_bank(
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
|
||||
@@ -527,14 +526,14 @@ static void air_powered_vertical_rc_track_left_bank(
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_right_bank(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
air_powered_vertical_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_brakes(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4] = {
|
||||
@@ -544,10 +543,10 @@ static void air_powered_vertical_rc_track_brakes(
|
||||
SPR_AIR_POWERED_VERTICAL_RC_BRAKES_SW_NE,
|
||||
};
|
||||
|
||||
uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height);
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
|
||||
@@ -556,7 +555,7 @@ static void air_powered_vertical_rc_track_brakes(
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_vertical_slope_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t trackImageIds[7][4] = {
|
||||
@@ -655,7 +654,7 @@ static void air_powered_vertical_rc_track_vertical_slope_up(
|
||||
};
|
||||
|
||||
uint32_t supportsImageId = supportImageIds[trackSequence][direction] | air_powered_vertical_rc_get_support_colour(session);
|
||||
uint32_t trackImageId = trackImageIds[trackSequence][direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t trackImageId = trackImageIds[trackSequence][direction] | session.TrackColours[SCHEME_TRACK];
|
||||
int8_t bbHeight;
|
||||
bool isDirection03 = (direction == 0 || direction == 3);
|
||||
switch (trackSequence)
|
||||
@@ -665,7 +664,7 @@ static void air_powered_vertical_rc_track_vertical_slope_up(
|
||||
PaintAddImageAsParentRotated(session, direction, supportsImageId, 0, 0, 20, 32, bbHeight, height, 0, 6, height);
|
||||
PaintAddImageAsChildRotated(session, direction, trackImageId, 0, 0, 20, 32, bbHeight, height, 0, 6, height);
|
||||
|
||||
wooden_a_supports_paint_setup(session, 0, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
|
||||
@@ -689,7 +688,7 @@ static void air_powered_vertical_rc_track_vertical_slope_up(
|
||||
PaintAddImageAsChildRotated(session, direction, trackImageId, 0, 0, 32, 20, bbHeight, height, 0, 6, height);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
if (trackSequence == 0)
|
||||
{
|
||||
@@ -713,21 +712,21 @@ static void air_powered_vertical_rc_track_vertical_slope_up(
|
||||
PaintAddImageAsChildRotated(session, direction, supportsImageId, 0, 0, 32, 20, bbHeight, height, 0, 6, height);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + supportHeights[trackSequence], 0x20);
|
||||
break;
|
||||
case 5:
|
||||
if (wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]))
|
||||
if (wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]))
|
||||
{
|
||||
uint32_t floorImageId;
|
||||
if (direction & 1)
|
||||
{
|
||||
floorImageId = SPR_FLOOR_PLANKS_90_DEG | session->TrackColours[SCHEME_SUPPORTS];
|
||||
floorImageId = SPR_FLOOR_PLANKS_90_DEG | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
floorImageId = SPR_FLOOR_PLANKS | session->TrackColours[SCHEME_SUPPORTS];
|
||||
floorImageId = SPR_FLOOR_PLANKS | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
PaintAddImageAsParent(session, floorImageId, { 0, 0, height }, { 26, 26, 126 }, { 3, 3, height });
|
||||
PaintAddImageAsChildRotated(session, direction, supportsImageId, 0, 0, 26, 26, 126, height, 3, 3, height);
|
||||
@@ -750,7 +749,7 @@ static void air_powered_vertical_rc_track_vertical_slope_up(
|
||||
PaintAddImageAsParentRotated(session, direction, trackImageId, 0, 0, 1, 20, 126, height, 27, 6, height);
|
||||
PaintAddImageAsChildRotated(session, direction, supportsImageId, 0, 0, 1, 20, 126, height, 27, 6, height);
|
||||
}
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_set_vertical_tunnel(session, height + 240);
|
||||
|
||||
@@ -761,7 +760,7 @@ static void air_powered_vertical_rc_track_vertical_slope_up(
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_vertical_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][2] = {
|
||||
@@ -779,7 +778,7 @@ static void air_powered_vertical_rc_track_vertical_up(
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 26, 26, 79, height, 3, 3, height);
|
||||
break;
|
||||
case 1:
|
||||
imageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = imageIds[direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 2, 20, 79, height, 0, 6, height);
|
||||
@@ -798,7 +797,7 @@ static void air_powered_vertical_rc_track_vertical_up(
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_vertical_top(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
if (direction == 2 || direction == 3)
|
||||
@@ -831,7 +830,7 @@ static void air_powered_vertical_rc_track_vertical_top(
|
||||
{
|
||||
case 0:
|
||||
imageIdS = imageIds[direction][0] | air_powered_vertical_rc_get_support_colour(session);
|
||||
imageIdT = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageIdT = imageIds[direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0)
|
||||
{
|
||||
PaintAddImageAsParentRotated(session, direction, imageIdS, 0, 0, 32, 20, 15, height, 0, 6, height);
|
||||
@@ -844,7 +843,7 @@ static void air_powered_vertical_rc_track_vertical_top(
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
imageIdT = imageIds[direction][2] | session->TrackColours[SCHEME_TRACK];
|
||||
imageIdT = imageIds[direction][2] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0)
|
||||
{
|
||||
PaintAddImageAsParentRotated(session, direction, imageIdT, 0, 0, 2, 20, 15, height, 0, 6, height);
|
||||
@@ -856,7 +855,7 @@ static void air_powered_vertical_rc_track_vertical_top(
|
||||
paint_util_set_vertical_tunnel(session, height + 80);
|
||||
break;
|
||||
case 2:
|
||||
imageIdT = imageIds[direction][3] | session->TrackColours[SCHEME_TRACK];
|
||||
imageIdT = imageIds[direction][3] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0)
|
||||
{
|
||||
PaintAddImageAsParentRotated(session, direction, imageIdT, 0, 0, 2, 20, 1, height, 33, 6, height);
|
||||
@@ -869,7 +868,7 @@ static void air_powered_vertical_rc_track_vertical_top(
|
||||
break;
|
||||
case 3:
|
||||
imageIdS = imageIds[direction][4] | air_powered_vertical_rc_get_support_colour(session);
|
||||
imageIdT = imageIds[direction][5] | session->TrackColours[SCHEME_TRACK];
|
||||
imageIdT = imageIds[direction][5] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0)
|
||||
{
|
||||
PaintAddImageAsParentRotated(session, direction, imageIdS, 0, 0, 5, 20, 1, height, 24, 6, height);
|
||||
@@ -888,14 +887,14 @@ static void air_powered_vertical_rc_track_vertical_top(
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_vertical_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
air_powered_vertical_rc_track_vertical_up(session, ride, trackSequence ^ 1, (direction + 2) & 3, height, trackElement);
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_vertical_slope_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
air_powered_vertical_rc_track_vertical_slope_up(
|
||||
@@ -903,12 +902,12 @@ static void air_powered_vertical_rc_track_vertical_slope_down(
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_booster(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
// The booster piece is borrowed from the Reverse Freefall Colour.
|
||||
// It has two track colours, instead of the one that the APVC has.
|
||||
uint32_t colour = session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t colour = session.TrackColours[SCHEME_TRACK];
|
||||
if (!trackElement.IsGhost() && !trackElement.IsHighlighted())
|
||||
{
|
||||
// Replace remap colour 2 (bits 24-28) with a copy of remap colour 1 (bits 19-23).
|
||||
@@ -930,13 +929,13 @@ static void air_powered_vertical_rc_track_booster(
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1) ? 1 : 0, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1) ? 1 : 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
}
|
||||
|
||||
static void air_powered_vertical_rc_track_onride_photo(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4] = {
|
||||
@@ -946,10 +945,10 @@ static void air_powered_vertical_rc_track_onride_photo(
|
||||
SPR_AIR_POWERED_VERTICAL_RC_FLAT_NW_SE,
|
||||
};
|
||||
|
||||
uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height);
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement);
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+1344
-1508
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -20,7 +20,7 @@
|
||||
|
||||
/** rct2: 0x008B0460 */
|
||||
static void inverted_impulse_rc_track_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
switch (direction)
|
||||
@@ -28,23 +28,23 @@ static void inverted_impulse_rc_track_flat(
|
||||
case 0:
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19662, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19662, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 29);
|
||||
break;
|
||||
case 1:
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19663, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19663, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 29);
|
||||
break;
|
||||
}
|
||||
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0);
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 44, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 44, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_INVERTED_3);
|
||||
@@ -53,7 +53,7 @@ static void inverted_impulse_rc_track_flat(
|
||||
|
||||
/** rct2: 0x008B0470, 0x008B0480, 0x008B0490 */
|
||||
static void inverted_impulse_rc_track_station(
|
||||
paint_session* session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][3] = {
|
||||
@@ -64,14 +64,14 @@ static void inverted_impulse_rc_track_station(
|
||||
};
|
||||
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, imageIds[direction][0] | session->TrackColours[SCHEME_MISC], 0, 0, 32, 28, 1, height, 0, 2, height);
|
||||
session, direction, imageIds[direction][0] | session.TrackColours[SCHEME_MISC], 0, 0, 32, 28, 1, height, 0, 2, height);
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, imageIds[direction][1] | session->TrackColours[SCHEME_TRACK], 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, imageIds[direction][1] | session.TrackColours[SCHEME_TRACK], 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 29);
|
||||
PaintAddImageAsChildRotated(
|
||||
session, direction, imageIds[direction][2] | session->TrackColours[SCHEME_SUPPORTS], 0, 6, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, imageIds[direction][2] | session.TrackColours[SCHEME_SUPPORTS], 0, 6, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 29);
|
||||
track_paint_util_draw_station_metal_supports_2(session, direction, height, session->TrackColours[SCHEME_SUPPORTS], 11);
|
||||
track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11);
|
||||
track_paint_util_draw_station_inverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL);
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9);
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
@@ -80,54 +80,54 @@ static void inverted_impulse_rc_track_station(
|
||||
|
||||
/** rct2: 0x008B04A0 */
|
||||
static void inverted_impulse_rc_track_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19672, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19672, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 45);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19673, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19673, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 45);
|
||||
break;
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19674, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19674, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 45);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19675, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19675, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 45);
|
||||
break;
|
||||
}
|
||||
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0);
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height + 62, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height + 62, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 1:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height + 62, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height + 62, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 2:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height + 62, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height + 62, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 3:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height + 62, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height + 62, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -145,29 +145,29 @@ static void inverted_impulse_rc_track_25_deg_up(
|
||||
|
||||
/** rct2: 0x008B04B0 */
|
||||
static void inverted_impulse_rc_track_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19688, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19688, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 93);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19689, 0, 0, 32, 2, 81, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19689, 0, 0, 32, 2, 81, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19690, 0, 0, 32, 2, 81, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19690, 0, 0, 32, 2, 81, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19691, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19691, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 93);
|
||||
break;
|
||||
}
|
||||
@@ -186,29 +186,29 @@ static void inverted_impulse_rc_track_60_deg_up(
|
||||
|
||||
/** rct2: 0x008B04C0 */
|
||||
static void inverted_impulse_rc_track_flat_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19664, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19664, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 37);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19665, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19665, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 37);
|
||||
break;
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19666, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19666, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 37);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19667, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19667, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 37);
|
||||
break;
|
||||
}
|
||||
@@ -219,19 +219,19 @@ static void inverted_impulse_rc_track_flat_to_25_deg_up(
|
||||
{
|
||||
case 0:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height + 54, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height + 54, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 1:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height + 54, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height + 54, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 2:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height + 54, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height + 54, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 3:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height + 54, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height + 54, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -248,35 +248,35 @@ static void inverted_impulse_rc_track_flat_to_25_deg_up(
|
||||
|
||||
/** rct2: 0x008B04D0 */
|
||||
static void inverted_impulse_rc_track_25_deg_up_to_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19676, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19676, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 61);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19680, 0, 0, 32, 10, 49, height + 29, 0, 10,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19680, 0, 0, 32, 10, 49, height + 29, 0, 10,
|
||||
height + 11);
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19677, 0, 0, 32, 2, 49, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19677, 0, 0, 32, 2, 49, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19681, 0, 0, 32, 10, 49, height + 29, 0, 10,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19681, 0, 0, 32, 10, 49, height + 29, 0, 10,
|
||||
height + 11);
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19678, 0, 0, 32, 2, 49, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19678, 0, 0, 32, 2, 49, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19679, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19679, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 61);
|
||||
break;
|
||||
}
|
||||
@@ -295,35 +295,35 @@ static void inverted_impulse_rc_track_25_deg_up_to_60_deg_up(
|
||||
|
||||
/** rct2: 0x008B04E0 */
|
||||
static void inverted_impulse_rc_track_60_deg_up_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19682, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19682, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 61);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19686, 0, 0, 32, 10, 49, height + 29, 0, 10,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19686, 0, 0, 32, 10, 49, height + 29, 0, 10,
|
||||
height + 11);
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19683, 0, 0, 32, 2, 49, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19683, 0, 0, 32, 2, 49, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19687, 0, 0, 32, 10, 49, height + 29, 0, 10,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19687, 0, 0, 32, 10, 49, height + 29, 0, 10,
|
||||
height + 11);
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19684, 0, 0, 32, 2, 49, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19684, 0, 0, 32, 2, 49, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19685, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19685, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 61);
|
||||
break;
|
||||
}
|
||||
@@ -342,29 +342,29 @@ static void inverted_impulse_rc_track_60_deg_up_to_25_deg_up(
|
||||
|
||||
/** rct2: 0x008B04F0 */
|
||||
static void inverted_impulse_rc_track_25_deg_up_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19668, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19668, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 37);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19669, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19669, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 37);
|
||||
break;
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19670, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19670, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 37);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19671, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19671, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 37);
|
||||
break;
|
||||
}
|
||||
@@ -375,19 +375,19 @@ static void inverted_impulse_rc_track_25_deg_up_to_flat(
|
||||
{
|
||||
case 0:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height + 52, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height + 52, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 1:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height + 52, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height + 52, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 2:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height + 52, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height + 52, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 3:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height + 52, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height + 52, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -404,7 +404,7 @@ static void inverted_impulse_rc_track_25_deg_up_to_flat(
|
||||
|
||||
/** rct2: 0x008B0500 */
|
||||
static void inverted_impulse_rc_track_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
inverted_impulse_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -412,7 +412,7 @@ static void inverted_impulse_rc_track_25_deg_down(
|
||||
|
||||
/** rct2: 0x008B0510 */
|
||||
static void inverted_impulse_rc_track_60_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
inverted_impulse_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -420,7 +420,7 @@ static void inverted_impulse_rc_track_60_deg_down(
|
||||
|
||||
/** rct2: 0x008B0520 */
|
||||
static void inverted_impulse_rc_track_flat_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
inverted_impulse_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -428,7 +428,7 @@ static void inverted_impulse_rc_track_flat_to_25_deg_down(
|
||||
|
||||
/** rct2: 0x008B0530 */
|
||||
static void inverted_impulse_rc_track_25_deg_down_to_60_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
inverted_impulse_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -436,7 +436,7 @@ static void inverted_impulse_rc_track_25_deg_down_to_60_deg_down(
|
||||
|
||||
/** rct2: 0x008B0540 */
|
||||
static void inverted_impulse_rc_track_60_deg_down_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
inverted_impulse_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -444,7 +444,7 @@ static void inverted_impulse_rc_track_60_deg_down_to_25_deg_down(
|
||||
|
||||
/** rct2: 0x008B0550 */
|
||||
static void inverted_impulse_rc_track_25_deg_down_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
inverted_impulse_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -452,7 +452,7 @@ static void inverted_impulse_rc_track_25_deg_down_to_flat(
|
||||
|
||||
/** rct2: 0x008B05A0 */
|
||||
static void inverted_impulse_rc_track_90_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
switch (trackSequence)
|
||||
@@ -462,22 +462,22 @@ static void inverted_impulse_rc_track_90_deg_up(
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19700, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19700, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 61);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19701, 0, 0, 32, 2, 31, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19701, 0, 0, 32, 2, 31, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19702, 0, 0, 32, 2, 31, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19702, 0, 0, 32, 2, 31, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19703, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19703, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 61);
|
||||
break;
|
||||
}
|
||||
@@ -493,7 +493,7 @@ static void inverted_impulse_rc_track_90_deg_up(
|
||||
|
||||
/** rct2: 0x008B05B0 */
|
||||
static void inverted_impulse_rc_track_90_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
inverted_impulse_rc_track_90_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -501,7 +501,7 @@ static void inverted_impulse_rc_track_90_deg_down(
|
||||
|
||||
/** rct2: 0x008B0560 */
|
||||
static void inverted_impulse_rc_track_60_deg_up_to_90_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
switch (trackSequence)
|
||||
@@ -511,22 +511,22 @@ static void inverted_impulse_rc_track_60_deg_up_to_90_deg_up(
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19692, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19692, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 85);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19693, 0, 0, 32, 2, 55, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19693, 0, 0, 32, 2, 55, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19694, 0, 0, 32, 2, 55, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19694, 0, 0, 32, 2, 55, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19695, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19695, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 85);
|
||||
break;
|
||||
}
|
||||
@@ -546,7 +546,7 @@ static void inverted_impulse_rc_track_60_deg_up_to_90_deg_up(
|
||||
|
||||
/** rct2: 0x008B0570 */
|
||||
static void inverted_impulse_rc_track_90_deg_down_to_60_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
inverted_impulse_rc_track_60_deg_up_to_90_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -554,29 +554,29 @@ static void inverted_impulse_rc_track_90_deg_down_to_60_deg_down(
|
||||
|
||||
/** rct2: 0x008B0580 */
|
||||
static void inverted_impulse_rc_track_90_deg_up_to_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19696, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19696, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 85);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19697, 0, 0, 32, 2, 55, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19697, 0, 0, 32, 2, 55, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19698, 0, 0, 32, 2, 55, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19698, 0, 0, 32, 2, 55, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19699, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19699, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 85);
|
||||
break;
|
||||
}
|
||||
@@ -596,7 +596,7 @@ static void inverted_impulse_rc_track_90_deg_up_to_60_deg_up(
|
||||
|
||||
/** rct2: 0x008B0590 */
|
||||
static void inverted_impulse_rc_track_60_deg_down_to_90_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
switch (trackSequence)
|
||||
@@ -606,22 +606,22 @@ static void inverted_impulse_rc_track_60_deg_down_to_90_deg_down(
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19698, 0, 0, 32, 2, 55, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19698, 0, 0, 32, 2, 55, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19699, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19699, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 85);
|
||||
break;
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19696, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19696, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 85);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19697, 0, 0, 32, 2, 55, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19697, 0, 0, 32, 2, 55, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
}
|
||||
@@ -640,7 +640,7 @@ static void inverted_impulse_rc_track_60_deg_down_to_90_deg_down(
|
||||
|
||||
/** rct2: 0x008B05C0 */
|
||||
static void inverted_impulse_rc_track_left_quarter_turn_1_90_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
switch (trackSequence)
|
||||
@@ -650,31 +650,31 @@ static void inverted_impulse_rc_track_left_quarter_turn_1_90_deg_up(
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19708, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19708, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 125);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19709, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19709, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 125);
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19717, 0, 0, 2, 32, 31, height + 29, 4, 0,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19717, 0, 0, 2, 32, 31, height + 29, 4, 0,
|
||||
height + 11);
|
||||
break;
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19710, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19710, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 125);
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19718, 0, 0, 32, 2, 31, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19718, 0, 0, 32, 2, 31, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19711, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19711, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 125);
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19719, 0, 0, 32, 2, 31, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19719, 0, 0, 32, 2, 31, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
}
|
||||
@@ -690,7 +690,7 @@ static void inverted_impulse_rc_track_left_quarter_turn_1_90_deg_up(
|
||||
|
||||
/** rct2: 0x008B05D0 */
|
||||
static void inverted_impulse_rc_track_right_quarter_turn_1_90_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
switch (trackSequence)
|
||||
@@ -700,31 +700,31 @@ static void inverted_impulse_rc_track_right_quarter_turn_1_90_deg_up(
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19704, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19704, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 125);
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19712, 0, 0, 32, 2, 31, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19712, 0, 0, 32, 2, 31, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19705, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19705, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 125);
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19713, 0, 0, 32, 2, 31, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19713, 0, 0, 32, 2, 31, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19706, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19706, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 125);
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19714, 0, 0, 32, 2, 31, height + 29, 0, 4,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19714, 0, 0, 32, 2, 31, height + 29, 0, 4,
|
||||
height + 11);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session->TrackColours[SCHEME_TRACK] | 19707, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
session, direction, session.TrackColours[SCHEME_TRACK] | 19707, 0, 0, 32, 20, 3, height + 29, 0, 6,
|
||||
height + 125);
|
||||
break;
|
||||
}
|
||||
@@ -740,7 +740,7 @@ static void inverted_impulse_rc_track_right_quarter_turn_1_90_deg_up(
|
||||
|
||||
/** rct2: 0x008B05E0 */
|
||||
static void inverted_impulse_rc_track_left_quarter_turn_1_90_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
inverted_impulse_rc_track_right_quarter_turn_1_90_deg_up(
|
||||
@@ -749,7 +749,7 @@ static void inverted_impulse_rc_track_left_quarter_turn_1_90_deg_down(
|
||||
|
||||
/** rct2: 0x008B05F0 */
|
||||
static void inverted_impulse_rc_track_right_quarter_turn_1_90_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
inverted_impulse_rc_track_left_quarter_turn_1_90_deg_up(
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -23,93 +23,93 @@ struct paint_session;
|
||||
struct TrackElement;
|
||||
|
||||
void junior_rc_paint_station(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, uint8_t rideType);
|
||||
|
||||
void junior_rc_paint_track_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_flat_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_25_deg_up_to_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_60_deg_up_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_25_deg_up_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
|
||||
void junior_rc_paint_track_left_quarter_turn_5_tiles_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_right_quarter_turn_5_tiles_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
|
||||
void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
|
||||
void junior_rc_paint_track_diag_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_flat_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_flat_to_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_25_deg_up_to_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_60_deg_up_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_25_deg_up_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_60_deg_up_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_60_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_flat_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_flat_to_60_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_25_deg_down_to_60_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_60_deg_down_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_25_deg_down_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
void junior_rc_paint_track_diag_60_deg_down_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
|
||||
const TrackElement& trackElement, JuniorRcChainType chainType);
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+891
-1026
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -196,29 +196,29 @@ static constexpr const uint32_t reverse_freefall_rc_track_pieces_vertical_suppor
|
||||
};
|
||||
|
||||
static void paint_reverse_freefall_rc_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
if (direction & 1)
|
||||
{
|
||||
uint32_t imageId = SPR_REVERSE_FREEFALL_RC_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = SPR_REVERSE_FREEFALL_RC_FLAT_NW_SE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height });
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32_t imageId = SPR_REVERSE_FREEFALL_RC_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = SPR_REVERSE_FREEFALL_RC_FLAT_SW_NE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height });
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1) ? 1 : 0, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1) ? 1 : 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
}
|
||||
|
||||
static void paint_reverse_freefall_rc_station(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
@@ -226,27 +226,27 @@ static void paint_reverse_freefall_rc_station(
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
// height -= 2 (height - 2)
|
||||
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_STATION_BASE_B_SW_NE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 1 }, { 0, 2, height });
|
||||
// height += 2 (height)
|
||||
|
||||
imageId = reverse_freefall_rc_track_pieces_station[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = reverse_freefall_rc_track_pieces_station[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height);
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1) ? 1 : 0, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1) ? 1 : 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
else if (direction == 1 || direction == 3)
|
||||
{
|
||||
// height -= 2 (height - 2)
|
||||
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_STATION_BASE_B_NW_SE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 1 }, { 2, 0, height });
|
||||
// height += 2 (height)
|
||||
|
||||
imageId = reverse_freefall_rc_track_pieces_station[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = reverse_freefall_rc_track_pieces_station[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height);
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1) ? 1 : 0, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1) ? 1 : 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ static void paint_reverse_freefall_rc_station(
|
||||
}
|
||||
|
||||
static void paint_reverse_freefall_rc_slope(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
TESTPAINT_IGNORE_ALL();
|
||||
@@ -268,9 +268,9 @@ static void paint_reverse_freefall_rc_slope(
|
||||
static constexpr const int32_t tunnelOffsets03[] = { 0, 0, 0, 16, 64 };
|
||||
|
||||
uint32_t supportsImageId = reverse_freefall_rc_track_pieces_slope_supports[trackSequence][direction]
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
uint32_t trackImageId = reverse_freefall_rc_track_pieces_slope[trackSequence][direction]
|
||||
| session->TrackColours[SCHEME_TRACK];
|
||||
| session.TrackColours[SCHEME_TRACK];
|
||||
int8_t bbHeight;
|
||||
bool isDirection03 = (direction == 0 || direction == 3);
|
||||
switch (trackSequence)
|
||||
@@ -303,21 +303,21 @@ static void paint_reverse_freefall_rc_slope(
|
||||
PaintAddImageAsChildRotated(session, direction, supportsImageId, 0, 0, 32, 20, bbHeight, height, 0, 6, height);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + supportHeights[trackSequence], 0x20);
|
||||
break;
|
||||
case 5:
|
||||
if (wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]))
|
||||
if (wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]))
|
||||
{
|
||||
uint32_t floorImageId;
|
||||
if (direction & 1)
|
||||
{
|
||||
floorImageId = SPR_FLOOR_PLANKS_90_DEG | session->TrackColours[SCHEME_SUPPORTS];
|
||||
floorImageId = SPR_FLOOR_PLANKS_90_DEG | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
else
|
||||
{
|
||||
floorImageId = SPR_FLOOR_PLANKS | session->TrackColours[SCHEME_SUPPORTS];
|
||||
floorImageId = SPR_FLOOR_PLANKS | session.TrackColours[SCHEME_SUPPORTS];
|
||||
}
|
||||
PaintAddImageAsParent(session, floorImageId, { 0, 0, height }, { 26, 26, 126 }, { 3, 3, height });
|
||||
PaintAddImageAsChildRotated(
|
||||
@@ -344,7 +344,7 @@ static void paint_reverse_freefall_rc_slope(
|
||||
PaintAddImageAsParentRotated(session, direction, trackImageId, 0, 0, 1, 20, 126, height, 27, 6, height);
|
||||
PaintAddImageAsChildRotated(session, direction, supportsImageId, 0, 0, 1, 20, 126, height, 27, 6, height);
|
||||
}
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + supportHeights[trackSequence], 0x20);
|
||||
break;
|
||||
@@ -352,7 +352,7 @@ static void paint_reverse_freefall_rc_slope(
|
||||
}
|
||||
|
||||
static void paint_reverse_freefall_rc_vertical(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t supportsImageId, trackImageId;
|
||||
@@ -360,13 +360,13 @@ static void paint_reverse_freefall_rc_vertical(
|
||||
{
|
||||
case 0:
|
||||
supportsImageId = reverse_freefall_rc_track_pieces_vertical_supports[direction]
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, supportsImageId, { 0, 0, height }, { 26, 26, 79 }, { 3, 3, height });
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 80, 0x20);
|
||||
break;
|
||||
case 1:
|
||||
trackImageId = reverse_freefall_rc_track_pieces_vertical[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
trackImageId = reverse_freefall_rc_track_pieces_vertical[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
PaintAddImageAsParentRotated(session, direction, trackImageId, 0, 0, 2, 20, 79, height, 0, 6, height);
|
||||
@@ -383,7 +383,7 @@ static void paint_reverse_freefall_rc_vertical(
|
||||
}
|
||||
|
||||
static void paint_reverse_freefall_rc_onride_photo(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4] = {
|
||||
@@ -395,7 +395,7 @@ static void paint_reverse_freefall_rc_onride_photo(
|
||||
|
||||
// The straight track without booster is borrowed from the APVC.
|
||||
// It has one track colour, instead of the two that the Reverse Freefall Colour has.
|
||||
uint32_t colour = session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t colour = session.TrackColours[SCHEME_TRACK];
|
||||
if (!trackElement.IsGhost() && !trackElement.IsHighlighted())
|
||||
{
|
||||
// Replace remap colour 1 (bits 19-23) with a copy of remap colour 2 (bits 24-28).
|
||||
@@ -407,7 +407,7 @@ static void paint_reverse_freefall_rc_onride_photo(
|
||||
uint32_t imageId = imageIds[direction] | colour;
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height);
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement);
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -164,10 +164,10 @@ static constexpr const uint32_t virginia_reel_track_pieces_flat_quarter_turn_1_t
|
||||
* rct2: 0x006D5B48
|
||||
*/
|
||||
void vehicle_visual_virginia_reel(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
const uint8_t rotation = session->CurrentRotation;
|
||||
const uint8_t rotation = session.CurrentRotation;
|
||||
int32_t ecx = ((vehicle->spin_sprite / 8) + (rotation * 8)) & 31;
|
||||
int32_t baseImage_id = [&] {
|
||||
switch (vehicle->Pitch)
|
||||
@@ -197,7 +197,7 @@ void vehicle_visual_virginia_reel(
|
||||
session, image_id, { 0, 0, z }, { bb->length_x, bb->length_y, bb->length_z },
|
||||
{ bb->offset_x, bb->offset_y, bb->offset_z + z });
|
||||
|
||||
if (session->DPI.zoom_level < ZoomLevel{ 2 } && vehicle->num_peeps > 0 && !vehicle->IsGhost())
|
||||
if (session.DPI.zoom_level < ZoomLevel{ 2 } && vehicle->num_peeps > 0 && !vehicle->IsGhost())
|
||||
{
|
||||
uint8_t riding_peep_sprites[4] = { 0xFF, 0xFF, 0xFF, 0xFF };
|
||||
for (int32_t i = 0; i < vehicle->num_peeps; i++)
|
||||
@@ -222,7 +222,7 @@ void vehicle_visual_virginia_reel(
|
||||
|
||||
/** rct2: 0x00811264 */
|
||||
static void paint_virginia_reel_track_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
const uint32_t* sprites = virginia_reel_track_pieces_flat;
|
||||
@@ -231,7 +231,7 @@ static void paint_virginia_reel_track_flat(
|
||||
sprites = virginia_reel_track_pieces_flat_lift_hill;
|
||||
}
|
||||
|
||||
uint32_t imageId = sprites[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = sprites[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction & 1)
|
||||
{
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 27, 32, 2 }, { 2, 0, height });
|
||||
@@ -243,7 +243,7 @@ static void paint_virginia_reel_track_flat(
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
@@ -251,7 +251,7 @@ static void paint_virginia_reel_track_flat(
|
||||
|
||||
/** rct2: 0x00811274 */
|
||||
static void paint_virginia_reel_track_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
const uint32_t* sprites = virginia_reel_track_pieces_25_deg_up;
|
||||
@@ -260,7 +260,7 @@ static void paint_virginia_reel_track_25_deg_up(
|
||||
sprites = virginia_reel_track_pieces_25_deg_up_lift_hill;
|
||||
}
|
||||
|
||||
uint32_t imageId = sprites[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = sprites[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
paint_struct* ps;
|
||||
|
||||
if (direction & 1)
|
||||
@@ -274,25 +274,25 @@ static void paint_virginia_reel_track_25_deg_up(
|
||||
|
||||
if (direction == 1 || direction == 2)
|
||||
{
|
||||
session->WoodenSupportsPrependTo = ps;
|
||||
session.WoodenSupportsPrependTo = ps;
|
||||
}
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
wooden_a_supports_paint_setup(session, 0, 9, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height - 8, TUNNEL_SQUARE_7);
|
||||
break;
|
||||
case 1:
|
||||
wooden_a_supports_paint_setup(session, 1, 10, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height + 8, TUNNEL_SQUARE_8);
|
||||
break;
|
||||
case 2:
|
||||
wooden_a_supports_paint_setup(session, 0, 11, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height + 8, TUNNEL_SQUARE_8);
|
||||
break;
|
||||
case 3:
|
||||
wooden_a_supports_paint_setup(session, 1, 12, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height - 8, TUNNEL_SQUARE_7);
|
||||
break;
|
||||
}
|
||||
@@ -303,7 +303,7 @@ static void paint_virginia_reel_track_25_deg_up(
|
||||
|
||||
/** rct2: 0x00811294 */
|
||||
static void paint_virginia_reel_track_flat_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
const uint32_t* sprites = virginia_reel_track_pieces_flat_to_25_deg_up;
|
||||
@@ -312,34 +312,34 @@ static void paint_virginia_reel_track_flat_to_25_deg_up(
|
||||
sprites = virginia_reel_track_pieces_flat_to_25_deg_up_lift_hill;
|
||||
}
|
||||
|
||||
uint32_t imageId = sprites[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = sprites[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
paint_struct* ps;
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height });
|
||||
|
||||
wooden_a_supports_paint_setup(session, 0, 1, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 0, 1, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
|
||||
break;
|
||||
case 1:
|
||||
ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 27, 32, 2 }, { 2, 0, height });
|
||||
session->WoodenSupportsPrependTo = ps;
|
||||
session.WoodenSupportsPrependTo = ps;
|
||||
|
||||
wooden_a_supports_paint_setup(session, 1, 2, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 1, 2, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_8);
|
||||
break;
|
||||
case 2:
|
||||
ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height });
|
||||
session->WoodenSupportsPrependTo = ps;
|
||||
session.WoodenSupportsPrependTo = ps;
|
||||
|
||||
wooden_a_supports_paint_setup(session, 0, 3, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 0, 3, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_8);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 27, 32, 2 }, { 2, 0, height });
|
||||
|
||||
wooden_a_supports_paint_setup(session, 1, 4, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
|
||||
break;
|
||||
}
|
||||
@@ -350,7 +350,7 @@ static void paint_virginia_reel_track_flat_to_25_deg_up(
|
||||
|
||||
/** rct2: 0x00811294 */
|
||||
static void paint_virginia_reel_track_25_deg_up_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
const uint32_t* sprites = virginia_reel_track_pieces_25_deg_up_to_flat;
|
||||
@@ -359,7 +359,7 @@ static void paint_virginia_reel_track_25_deg_up_to_flat(
|
||||
sprites = virginia_reel_track_pieces_25_deg_up_to_flat_lift_hill;
|
||||
}
|
||||
|
||||
uint32_t imageId = sprites[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = sprites[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
paint_struct* ps;
|
||||
|
||||
if (direction & 1)
|
||||
@@ -373,25 +373,25 @@ static void paint_virginia_reel_track_25_deg_up_to_flat(
|
||||
|
||||
if (direction == 1 || direction == 2)
|
||||
{
|
||||
session->WoodenSupportsPrependTo = ps;
|
||||
session.WoodenSupportsPrependTo = ps;
|
||||
}
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
wooden_a_supports_paint_setup(session, 0, 5, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height - 8, TUNNEL_SQUARE_FLAT);
|
||||
break;
|
||||
case 1:
|
||||
wooden_a_supports_paint_setup(session, 1, 6, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height + 8, TUNNEL_14);
|
||||
break;
|
||||
case 2:
|
||||
wooden_a_supports_paint_setup(session, 0, 7, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height + 8, TUNNEL_14);
|
||||
break;
|
||||
case 3:
|
||||
wooden_a_supports_paint_setup(session, 1, 8, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height - 8, TUNNEL_SQUARE_FLAT);
|
||||
break;
|
||||
}
|
||||
@@ -402,7 +402,7 @@ static void paint_virginia_reel_track_25_deg_up_to_flat(
|
||||
|
||||
/** rct2: 0x008112A4 */
|
||||
static void paint_virginia_reel_track_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_virginia_reel_track_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -410,7 +410,7 @@ static void paint_virginia_reel_track_25_deg_down(
|
||||
|
||||
/** rct2: 0x008112B4 */
|
||||
static void paint_virginia_reel_track_flat_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_virginia_reel_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -418,7 +418,7 @@ static void paint_virginia_reel_track_flat_to_25_deg_down(
|
||||
|
||||
/** rct2: 0x008112C4 */
|
||||
static void paint_virginia_reel_track_25_deg_down_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_virginia_reel_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -426,33 +426,33 @@ static void paint_virginia_reel_track_25_deg_down_to_flat(
|
||||
|
||||
/** rct2: 0x008112D4, 0x008112E4, 0x008112F4 */
|
||||
static void paint_virginia_reel_station(
|
||||
paint_session* session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_STATION_BASE_B_SW_NE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 2 }, { 0, 2, height });
|
||||
|
||||
imageId = SPR_VIRGINIA_REEL_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_VIRGINIA_REEL_FLAT_SW_NE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 32, 20, 2, height, 0, 0, height);
|
||||
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
else if (direction == 1 || direction == 3)
|
||||
{
|
||||
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_STATION_BASE_B_NW_SE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 2 }, { 2, 0, height });
|
||||
|
||||
imageId = SPR_VIRGINIA_REEL_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_VIRGINIA_REEL_FLAT_NW_SE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 20, 32, 2, height, 0, 0, height);
|
||||
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
track_paint_util_draw_station(session, ride, direction, height, trackElement);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
@@ -468,11 +468,11 @@ static constexpr const uint8_t virginia_reel_left_quarter_turn_supports[] = {
|
||||
|
||||
/** rct2: 0x00811304 */
|
||||
static void paint_virginia_reel_track_left_quarter_turn_3_tiles(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
track_paint_util_left_quarter_turn_3_tiles_paint(
|
||||
session, 2, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK],
|
||||
session, 2, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK],
|
||||
virginia_reel_track_pieces_flat_quarter_turn_3_tiles);
|
||||
track_paint_util_left_quarter_turn_3_tiles_tunnel(session, height, TUNNEL_SQUARE_FLAT, direction, trackSequence);
|
||||
|
||||
@@ -485,8 +485,7 @@ static void paint_virginia_reel_track_left_quarter_turn_3_tiles(
|
||||
case 0:
|
||||
case 3:
|
||||
wooden_a_supports_paint_setup(
|
||||
session, virginia_reel_left_quarter_turn_supports[direction], 0, height,
|
||||
session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, virginia_reel_left_quarter_turn_supports[direction], 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(session, paint_util_rotate_segments(SEGMENTS_ALL, direction), 0xFFFF, 0);
|
||||
break;
|
||||
}
|
||||
@@ -503,7 +502,7 @@ static constexpr const uint8_t virginia_reel_right_quarter_turn_3_tiles_to_left_
|
||||
|
||||
/** rct2: 0x00811314 */
|
||||
static void paint_virginia_reel_track_right_quarter_turn_3_tiles(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = virginia_reel_right_quarter_turn_3_tiles_to_left_turn_map[trackSequence];
|
||||
@@ -513,28 +512,28 @@ static void paint_virginia_reel_track_right_quarter_turn_3_tiles(
|
||||
|
||||
/** rct2: 0x00811324 */
|
||||
static void paint_virginia_reel_track_left_quarter_turn_1_tile(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
track_paint_util_left_quarter_turn_1_tile_paint(
|
||||
session, 2, height, 0, direction, session->TrackColours[SCHEME_TRACK],
|
||||
session, 2, height, 0, direction, session.TrackColours[SCHEME_TRACK],
|
||||
virginia_reel_track_pieces_flat_quarter_turn_1_tile);
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
wooden_a_supports_paint_setup(session, 5, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
|
||||
break;
|
||||
case 1:
|
||||
wooden_a_supports_paint_setup(session, 2, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 2:
|
||||
wooden_a_supports_paint_setup(session, 3, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
|
||||
break;
|
||||
case 3:
|
||||
wooden_a_supports_paint_setup(session, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
|
||||
break;
|
||||
@@ -546,7 +545,7 @@ static void paint_virginia_reel_track_left_quarter_turn_1_tile(
|
||||
|
||||
/** rct2: 0x00811334 */
|
||||
static void paint_virginia_reel_track_right_quarter_turn_1_tile(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_virginia_reel_track_left_quarter_turn_1_tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement);
|
||||
|
||||
@@ -165,7 +165,7 @@ static constexpr const uint32_t _wild_mouse_block_brakes_image_ids[NumOrthogonal
|
||||
|
||||
/** rct2: 0x0078B1E4 */
|
||||
static void wild_mouse_track_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][2] = {
|
||||
@@ -176,11 +176,11 @@ static void wild_mouse_track_flat(
|
||||
};
|
||||
|
||||
uint8_t isChained = trackElement.HasChain() ? 1 : 0;
|
||||
uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction][isChained] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -1, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -1, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_0);
|
||||
paint_util_set_segment_support_height(
|
||||
@@ -189,7 +189,7 @@ static void wild_mouse_track_flat(
|
||||
}
|
||||
|
||||
static void wild_mouse_track_station(
|
||||
paint_session* session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t baseImageIds[4] = {
|
||||
@@ -201,22 +201,22 @@ static void wild_mouse_track_station(
|
||||
|
||||
int32_t trackType = trackElement.GetTrackType();
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, baseImageIds[direction] | session->TrackColours[SCHEME_MISC], 0, 0, 32, 28, 2, height - 2, 0, 2,
|
||||
session, direction, baseImageIds[direction] | session.TrackColours[SCHEME_MISC], 0, 0, 32, 28, 2, height - 2, 0, 2,
|
||||
height);
|
||||
if (trackType == TrackElemType::EndStation)
|
||||
{
|
||||
bool isClosed = trackElement.BlockBrakeClosed();
|
||||
PaintAddImageAsChildRotated(
|
||||
session, direction, _wild_mouse_block_brakes_image_ids[direction][isClosed] | session->TrackColours[SCHEME_TRACK],
|
||||
0, 0, 32, 20, 2, height, 0, 0, height);
|
||||
session, direction, _wild_mouse_block_brakes_image_ids[direction][isClosed] | session.TrackColours[SCHEME_TRACK], 0,
|
||||
0, 32, 20, 2, height, 0, 0, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
PaintAddImageAsChildRotated(
|
||||
session, direction, _wild_mouse_brakes_image_ids[direction] | session->TrackColours[SCHEME_TRACK], 0, 0, 32, 20, 2,
|
||||
session, direction, _wild_mouse_brakes_image_ids[direction] | session.TrackColours[SCHEME_TRACK], 0, 0, 32, 20, 2,
|
||||
height, 0, 0, height);
|
||||
}
|
||||
track_paint_util_draw_station_metal_supports(session, direction, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
track_paint_util_draw_station_metal_supports(session, direction, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
track_paint_util_draw_station(session, ride, direction, height, trackElement);
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
@@ -225,7 +225,7 @@ static void wild_mouse_track_station(
|
||||
|
||||
/** rct2: 0x0078B1F4 */
|
||||
static void wild_mouse_track_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][2] = {
|
||||
@@ -236,11 +236,11 @@ static void wild_mouse_track_25_deg_up(
|
||||
};
|
||||
|
||||
uint8_t isChained = trackElement.HasChain() ? 1 : 0;
|
||||
uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction][isChained] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -9, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -9, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
@@ -257,7 +257,7 @@ static void wild_mouse_track_25_deg_up(
|
||||
|
||||
/** rct2: 0x0078B204 */
|
||||
static void wild_mouse_track_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][2] = {
|
||||
@@ -268,7 +268,7 @@ static void wild_mouse_track_60_deg_up(
|
||||
};
|
||||
|
||||
uint8_t isChained = trackElement.HasChain() ? 1 : 0;
|
||||
uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction][isChained] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
@@ -277,15 +277,15 @@ static void wild_mouse_track_60_deg_up(
|
||||
{
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 1, 98, height, 0, 27, height);
|
||||
}
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -33, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -33, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
else
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
}
|
||||
if (direction == 0 || direction == 3)
|
||||
@@ -303,7 +303,7 @@ static void wild_mouse_track_60_deg_up(
|
||||
|
||||
/** rct2: 0x0078B214 */
|
||||
static void wild_mouse_track_flat_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][2] = {
|
||||
@@ -314,11 +314,11 @@ static void wild_mouse_track_flat_to_25_deg_up(
|
||||
};
|
||||
|
||||
uint8_t isChained = trackElement.HasChain() ? 1 : 0;
|
||||
uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction][isChained] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -4, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -4, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
@@ -335,7 +335,7 @@ static void wild_mouse_track_flat_to_25_deg_up(
|
||||
|
||||
/** rct2: 0x0078B224 */
|
||||
static void wild_mouse_track_25_deg_up_to_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][2] = {
|
||||
@@ -352,8 +352,8 @@ static void wild_mouse_track_25_deg_up_to_60_deg_up(
|
||||
};
|
||||
|
||||
uint8_t isChained = trackElement.HasChain() ? 1 : 0;
|
||||
uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t frontImageId = frontImageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction][isChained] | session.TrackColours[SCHEME_TRACK];
|
||||
uint32_t frontImageId = frontImageIds[direction][isChained] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
@@ -363,9 +363,9 @@ static void wild_mouse_track_25_deg_up_to_60_deg_up(
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
PaintAddImageAsParentRotated(session, direction, frontImageId, 0, 0, 32, 1, 66, height, 0, 27, height);
|
||||
}
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -13, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -13, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
@@ -382,7 +382,7 @@ static void wild_mouse_track_25_deg_up_to_60_deg_up(
|
||||
|
||||
/** rct2: 0x0078B234 */
|
||||
static void wild_mouse_track_60_deg_up_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][2] = {
|
||||
@@ -399,8 +399,8 @@ static void wild_mouse_track_60_deg_up_to_25_deg_up(
|
||||
};
|
||||
|
||||
uint8_t isChained = trackElement.HasChain() ? 1 : 0;
|
||||
uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t frontImageId = frontImageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction][isChained] | session.TrackColours[SCHEME_TRACK];
|
||||
uint32_t frontImageId = frontImageIds[direction][isChained] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
@@ -410,9 +410,9 @@ static void wild_mouse_track_60_deg_up_to_25_deg_up(
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
PaintAddImageAsParentRotated(session, direction, frontImageId, 0, 0, 32, 1, 66, height, 0, 27, height);
|
||||
}
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -21, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -21, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
@@ -429,7 +429,7 @@ static void wild_mouse_track_60_deg_up_to_25_deg_up(
|
||||
|
||||
/** rct2: 0x0078B244 */
|
||||
static void wild_mouse_track_25_deg_up_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][2] = {
|
||||
@@ -440,11 +440,11 @@ static void wild_mouse_track_25_deg_up_to_flat(
|
||||
};
|
||||
|
||||
uint8_t isChained = trackElement.HasChain() ? 1 : 0;
|
||||
uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction][isChained] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -7, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -7, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
@@ -461,7 +461,7 @@ static void wild_mouse_track_25_deg_up_to_flat(
|
||||
|
||||
/** rct2: 0x0078B254 */
|
||||
static void wild_mouse_track_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wild_mouse_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -469,7 +469,7 @@ static void wild_mouse_track_25_deg_down(
|
||||
|
||||
/** rct2: 0x0078B264 */
|
||||
static void wild_mouse_track_60_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wild_mouse_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -477,7 +477,7 @@ static void wild_mouse_track_60_deg_down(
|
||||
|
||||
/** rct2: 0x0078B274 */
|
||||
static void wild_mouse_track_flat_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wild_mouse_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -485,7 +485,7 @@ static void wild_mouse_track_flat_to_25_deg_down(
|
||||
|
||||
/** rct2: 0x0078B284 */
|
||||
static void wild_mouse_track_25_deg_down_to_60_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wild_mouse_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -493,7 +493,7 @@ static void wild_mouse_track_25_deg_down_to_60_deg_down(
|
||||
|
||||
/** rct2: 0x0078B294 */
|
||||
static void wild_mouse_track_60_deg_down_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wild_mouse_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -501,14 +501,14 @@ static void wild_mouse_track_60_deg_down_to_25_deg_down(
|
||||
|
||||
/** rct2: 0x0078B2A4 */
|
||||
static void wild_mouse_track_25_deg_down_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wild_mouse_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
}
|
||||
|
||||
static void wild_mouse_track_right_quarter_turn_3(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const sprite_bb imageIds[4][3] = {
|
||||
@@ -535,14 +535,14 @@ static void wild_mouse_track_right_quarter_turn_3(
|
||||
};
|
||||
|
||||
track_paint_util_right_quarter_turn_3_tiles_paint_3(
|
||||
session, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], imageIds);
|
||||
session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIds);
|
||||
track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_0);
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -1, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -1, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -564,7 +564,7 @@ static void wild_mouse_track_right_quarter_turn_3(
|
||||
}
|
||||
|
||||
static void wild_mouse_track_right_quarter_turn_3_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const sprite_bb imageIds[4][2] = {
|
||||
@@ -593,7 +593,7 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_down(
|
||||
const sprite_bb* sbb = &imageIds[direction][part];
|
||||
const auto& offset = sbb->offset;
|
||||
PaintAddImageAsParent(
|
||||
session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], { offset.x, offset.y, height + offset.z },
|
||||
session, sbb->sprite_id | session.TrackColours[SCHEME_TRACK], { offset.x, offset.y, height + offset.z },
|
||||
sbb->bb_size);
|
||||
}
|
||||
|
||||
@@ -604,7 +604,7 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_down(
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -9, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -9, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -623,7 +623,7 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_down(
|
||||
}
|
||||
|
||||
static void wild_mouse_track_left_quarter_turn_3_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence];
|
||||
@@ -632,7 +632,7 @@ static void wild_mouse_track_left_quarter_turn_3_25_deg_up(
|
||||
|
||||
/** rct2: 0x0078B314 */
|
||||
static void wild_mouse_track_right_quarter_turn_3_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const sprite_bb imageIds[4][2] = {
|
||||
@@ -660,7 +660,7 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_up(
|
||||
int32_t part = trackSequence == 0 ? 0 : 1;
|
||||
const sprite_bb* sbb = &imageIds[direction][part];
|
||||
PaintAddImageAsParent(
|
||||
session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK],
|
||||
session, sbb->sprite_id | session.TrackColours[SCHEME_TRACK],
|
||||
{ sbb->offset.x, sbb->offset.y, height + sbb->offset.z }, sbb->bb_size);
|
||||
}
|
||||
|
||||
@@ -669,18 +669,18 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_up(
|
||||
switch (trackSequence)
|
||||
{
|
||||
case 0:
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -9, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -9, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 3:
|
||||
if (direction == 2)
|
||||
{
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES, 4, -11, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES, 4, -11, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
else
|
||||
{
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES, 4, -9, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES, 4, -9, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -701,7 +701,7 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_up(
|
||||
|
||||
/** rct2: 0x0078B324 */
|
||||
static void wild_mouse_track_left_quarter_turn_3_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence];
|
||||
@@ -709,7 +709,7 @@ static void wild_mouse_track_left_quarter_turn_3_25_deg_down(
|
||||
}
|
||||
|
||||
static void wild_mouse_track_left_quarter_turn_3(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence];
|
||||
@@ -718,7 +718,7 @@ static void wild_mouse_track_left_quarter_turn_3(
|
||||
|
||||
/** rct2: 0x0078B394 */
|
||||
static void wild_mouse_track_left_quarter_turn_1(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4] = {
|
||||
@@ -728,7 +728,7 @@ static void wild_mouse_track_left_quarter_turn_1(
|
||||
SPR_WILD_MOUSE_QUARTER_TURN_1_SE_NW,
|
||||
};
|
||||
|
||||
uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
@@ -744,7 +744,7 @@ static void wild_mouse_track_left_quarter_turn_1(
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 24, 2 }, { 6, 6, height });
|
||||
break;
|
||||
}
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -1, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -1, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0);
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0);
|
||||
@@ -753,7 +753,7 @@ static void wild_mouse_track_left_quarter_turn_1(
|
||||
|
||||
/** rct2: 0x0078B3A4 */
|
||||
static void wild_mouse_track_right_quarter_turn_1(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wild_mouse_track_left_quarter_turn_1(session, ride, trackSequence, (direction - 1) & 3, height, trackElement);
|
||||
@@ -761,7 +761,7 @@ static void wild_mouse_track_right_quarter_turn_1(
|
||||
|
||||
/** rct2: 0x0078B354 */
|
||||
static void wild_mouse_track_flat_to_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][2] = {
|
||||
@@ -778,8 +778,8 @@ static void wild_mouse_track_flat_to_60_deg_up(
|
||||
};
|
||||
|
||||
uint8_t isChained = trackElement.HasChain() ? 1 : 0;
|
||||
uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t frontImageId = frontImageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction][isChained] | session.TrackColours[SCHEME_TRACK];
|
||||
uint32_t frontImageId = frontImageIds[direction][isChained] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
|
||||
@@ -789,9 +789,9 @@ static void wild_mouse_track_flat_to_60_deg_up(
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 1, 24, 43, height, 29, 4, height + 2);
|
||||
PaintAddImageAsParentRotated(session, direction, frontImageId, 0, 0, 32, 2, 43, height, 0, 4, height);
|
||||
}
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -5, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -5, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
@@ -808,7 +808,7 @@ static void wild_mouse_track_flat_to_60_deg_up(
|
||||
|
||||
/** rct2: 0x0078B364 */
|
||||
static void wild_mouse_track_60_deg_up_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][2] = {
|
||||
@@ -825,8 +825,8 @@ static void wild_mouse_track_60_deg_up_to_flat(
|
||||
};
|
||||
|
||||
uint8_t isChained = trackElement.HasChain() ? 1 : 0;
|
||||
uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t frontImageId = frontImageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction][isChained] | session.TrackColours[SCHEME_TRACK];
|
||||
uint32_t frontImageId = frontImageIds[direction][isChained] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
|
||||
@@ -836,15 +836,15 @@ static void wild_mouse_track_60_deg_up_to_flat(
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 1, 24, 43, height, 29, 4, height + 2);
|
||||
PaintAddImageAsParentRotated(session, direction, frontImageId, 0, 0, 32, 2, 43, height, 0, 4, height);
|
||||
}
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -17, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -17, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
else
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, 16, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
}
|
||||
if (direction == 0 || direction == 3)
|
||||
@@ -862,7 +862,7 @@ static void wild_mouse_track_60_deg_up_to_flat(
|
||||
|
||||
/** rct2: 0x0078B374 */
|
||||
static void wild_mouse_track_flat_to_60_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wild_mouse_track_60_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -870,7 +870,7 @@ static void wild_mouse_track_flat_to_60_deg_down(
|
||||
|
||||
/** rct2: 0x0078B384 */
|
||||
static void wild_mouse_track_60_deg_down_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wild_mouse_track_flat_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -878,14 +878,14 @@ static void wild_mouse_track_60_deg_down_to_flat(
|
||||
|
||||
/** rct2: 0x0078B344 */
|
||||
static void wild_mouse_track_brakes(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = _wild_mouse_brakes_image_ids[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = _wild_mouse_brakes_image_ids[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_0);
|
||||
paint_util_set_segment_support_height(
|
||||
@@ -895,7 +895,7 @@ static void wild_mouse_track_brakes(
|
||||
|
||||
/** rct2: 0x0078B3C4 */
|
||||
static void wild_mouse_track_rotation_control_toggle(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4] = {
|
||||
@@ -905,11 +905,11 @@ static void wild_mouse_track_rotation_control_toggle(
|
||||
SPR_WILD_MOUSE_ROTATION_CONTROL_TOGGLE_NW_SE,
|
||||
};
|
||||
|
||||
uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_0);
|
||||
paint_util_set_segment_support_height(
|
||||
@@ -919,15 +919,15 @@ static void wild_mouse_track_rotation_control_toggle(
|
||||
|
||||
/** rct2: 0x0078B3B4 */
|
||||
static void wild_mouse_track_block_brakes(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
bool isClosed = trackElement.BlockBrakeClosed();
|
||||
uint32_t imageId = _wild_mouse_block_brakes_image_ids[direction][isClosed] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = _wild_mouse_block_brakes_image_ids[direction][isClosed] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_0);
|
||||
paint_util_set_segment_support_height(
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -122,7 +122,7 @@ enum
|
||||
|
||||
/** rct2: 0x008A5464 */
|
||||
static void wooden_wild_mouse_track_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4] = {
|
||||
@@ -132,9 +132,9 @@ static void wooden_wild_mouse_track_flat(
|
||||
SPR_WOODEN_WILD_MOUSE_FLAT_NW_SE,
|
||||
};
|
||||
|
||||
uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 6, 32, 20, 1, height);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_0);
|
||||
paint_util_set_segment_support_height(
|
||||
session,
|
||||
@@ -146,7 +146,7 @@ static void wooden_wild_mouse_track_flat(
|
||||
}
|
||||
|
||||
static void wooden_wild_mouse_track_station(
|
||||
paint_session* session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4][2] = {
|
||||
@@ -157,12 +157,11 @@ static void wooden_wild_mouse_track_station(
|
||||
};
|
||||
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, imageIds[direction][1] | session->TrackColours[SCHEME_MISC], 0, 0, 32, 28, 1, height - 2, 0, 2,
|
||||
session, direction, imageIds[direction][1] | session.TrackColours[SCHEME_MISC], 0, 0, 32, 28, 1, height - 2, 0, 2,
|
||||
height);
|
||||
PaintAddImageAsChildRotated(
|
||||
session, direction, imageIds[direction][0] | session->TrackColours[SCHEME_TRACK], 0, 6, 32, 20, 1, height, 0, 0,
|
||||
height);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, direction, imageIds[direction][0] | session.TrackColours[SCHEME_TRACK], 0, 6, 32, 20, 1, height, 0, 0, height);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
track_paint_util_draw_station(session, ride, direction, height, trackElement);
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
@@ -171,7 +170,7 @@ static void wooden_wild_mouse_track_station(
|
||||
|
||||
/** rct2: 0x008A5474 */
|
||||
static void wooden_wild_mouse_track_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[2][4] = {
|
||||
@@ -190,10 +189,10 @@ static void wooden_wild_mouse_track_25_deg_up(
|
||||
};
|
||||
|
||||
uint8_t isChained = trackElement.HasChain() ? 1 : 0;
|
||||
uint32_t imageId = imageIds[isChained][direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[isChained][direction] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 2, 32, 25, 1, height, 0, 3, height);
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 9 + direction, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 9 + direction, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
@@ -210,7 +209,7 @@ static void wooden_wild_mouse_track_25_deg_up(
|
||||
|
||||
/** rct2: 0x008A5484 */
|
||||
static void wooden_wild_mouse_track_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[2][4] = {
|
||||
@@ -229,18 +228,18 @@ static void wooden_wild_mouse_track_60_deg_up(
|
||||
};
|
||||
|
||||
uint8_t isChained = trackElement.HasChain() ? 1 : 0;
|
||||
uint32_t imageId = imageIds[isChained][direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[isChained][direction] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 2, 32, 25, 1, height, 0, 3, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
session->WoodenSupportsPrependTo = PaintAddImageAsParentRotated(
|
||||
session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated(
|
||||
session, direction, imageId, 0, 6, 2, 24, 93, height, 28, 4, height - 16);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 21 + direction, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 21 + direction, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
@@ -257,7 +256,7 @@ static void wooden_wild_mouse_track_60_deg_up(
|
||||
|
||||
/** rct2: 0x008A5494 */
|
||||
static void wooden_wild_mouse_track_flat_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[2][4] = {
|
||||
@@ -276,10 +275,10 @@ static void wooden_wild_mouse_track_flat_to_25_deg_up(
|
||||
};
|
||||
|
||||
uint8_t isChained = trackElement.HasChain() ? 1 : 0;
|
||||
uint32_t imageId = imageIds[isChained][direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[isChained][direction] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 2, 32, 25, 1, height, 0, 3, height);
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 1 + direction, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
@@ -296,7 +295,7 @@ static void wooden_wild_mouse_track_flat_to_25_deg_up(
|
||||
|
||||
/** rct2: 0x008A54A4 */
|
||||
static void wooden_wild_mouse_track_25_deg_up_to_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[2][4][2] = {
|
||||
@@ -318,19 +317,19 @@ static void wooden_wild_mouse_track_25_deg_up_to_60_deg_up(
|
||||
uint32_t imageId;
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = imageIds[isChained][direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 2, 32, 25, 1, height, 0, 3, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
session->WoodenSupportsPrependTo = PaintAddImageAsParentRotated(
|
||||
imageId = imageIds[isChained][direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated(
|
||||
session, direction, imageId, 0, 6, 2, 24, 43, height, 28, 4, height + 2);
|
||||
imageId = imageIds[isChained][direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = imageIds[isChained][direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 6, 32, 2, 43, height, 0, 4, height);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 13 + direction, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 13 + direction, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
@@ -346,7 +345,7 @@ static void wooden_wild_mouse_track_25_deg_up_to_60_deg_up(
|
||||
}
|
||||
|
||||
static void wooden_wild_mouse_track_60_deg_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[2][4][2] = {
|
||||
@@ -368,19 +367,19 @@ static void wooden_wild_mouse_track_60_deg_to_25_deg_up(
|
||||
uint32_t imageId;
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = imageIds[isChained][direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 2, 32, 25, 1, height, 0, 3, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
session->WoodenSupportsPrependTo = PaintAddImageAsParentRotated(
|
||||
imageId = imageIds[isChained][direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated(
|
||||
session, direction, imageId, 0, 6, 2, 24, 43, height, 28, 4, height + 2);
|
||||
imageId = imageIds[isChained][direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = imageIds[isChained][direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 6, 32, 2, 43, height, 0, 4, height);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 17 + direction, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 17 + direction, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
@@ -397,7 +396,7 @@ static void wooden_wild_mouse_track_60_deg_to_25_deg_up(
|
||||
|
||||
/** rct2: 0x008A54C4 */
|
||||
static void wooden_wild_mouse_track_25_deg_up_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[2][4] = {
|
||||
@@ -416,10 +415,10 @@ static void wooden_wild_mouse_track_25_deg_up_to_flat(
|
||||
};
|
||||
|
||||
uint8_t isChained = trackElement.HasChain() ? 1 : 0;
|
||||
uint32_t imageId = imageIds[isChained][direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[isChained][direction] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 2, 32, 25, 1, height, 0, 3, height);
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 5 + direction, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
@@ -436,7 +435,7 @@ static void wooden_wild_mouse_track_25_deg_up_to_flat(
|
||||
|
||||
/** rct2: 0x008A54D4 */
|
||||
static void wooden_wild_mouse_track_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wooden_wild_mouse_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -444,7 +443,7 @@ static void wooden_wild_mouse_track_25_deg_down(
|
||||
|
||||
/** rct2: 0x008A54E4 */
|
||||
static void wooden_wild_mouse_track_60_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wooden_wild_mouse_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -452,7 +451,7 @@ static void wooden_wild_mouse_track_60_deg_down(
|
||||
|
||||
/** rct2: 0x008A54F4 */
|
||||
static void wooden_wild_mouse_track_flat_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wooden_wild_mouse_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -460,7 +459,7 @@ static void wooden_wild_mouse_track_flat_to_25_deg_down(
|
||||
|
||||
/** rct2: 0x008A5504 */
|
||||
static void wooden_wild_mouse_track_25_deg_down_to_60_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wooden_wild_mouse_track_60_deg_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -468,7 +467,7 @@ static void wooden_wild_mouse_track_25_deg_down_to_60_deg_down(
|
||||
|
||||
/** rct2: 0x008A5514 */
|
||||
static void wooden_wild_mouse_track_60_deg_down_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wooden_wild_mouse_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -476,14 +475,14 @@ static void wooden_wild_mouse_track_60_deg_down_to_25_deg_down(
|
||||
|
||||
/** rct2: 0x008A5524 */
|
||||
static void wooden_wild_mouse_track_25_deg_down_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wooden_wild_mouse_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
}
|
||||
|
||||
static void wooden_wild_mouse_track_right_quarter_turn_3(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const sprite_bb imageIds[4][3] = {
|
||||
@@ -511,14 +510,14 @@ static void wooden_wild_mouse_track_right_quarter_turn_3(
|
||||
static uint8_t supportType[] = { 4, 5, 2, 3 };
|
||||
|
||||
track_paint_util_right_quarter_turn_3_tiles_paint_4(
|
||||
session, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], imageIds);
|
||||
session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIds);
|
||||
track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_0);
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
wooden_a_supports_paint_setup(session, supportType[direction], 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, supportType[direction], 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -540,7 +539,7 @@ static void wooden_wild_mouse_track_right_quarter_turn_3(
|
||||
}
|
||||
|
||||
static void wooden_wild_mouse_track_left_quarter_turn_3(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence];
|
||||
@@ -548,7 +547,7 @@ static void wooden_wild_mouse_track_left_quarter_turn_3(
|
||||
}
|
||||
|
||||
static void wooden_wild_mouse_track_left_quarter_turn_1(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[4] = {
|
||||
@@ -559,7 +558,7 @@ static void wooden_wild_mouse_track_left_quarter_turn_1(
|
||||
};
|
||||
static uint8_t supportType[] = { 5, 2, 3, 4 };
|
||||
|
||||
uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = imageIds[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
@@ -575,7 +574,7 @@ static void wooden_wild_mouse_track_left_quarter_turn_1(
|
||||
PaintAddImageAsParent(session, imageId, { 6, 6, height }, { 24, 24, 1 });
|
||||
break;
|
||||
}
|
||||
wooden_a_supports_paint_setup(session, supportType[direction], 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, supportType[direction], 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0);
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
@@ -583,7 +582,7 @@ static void wooden_wild_mouse_track_left_quarter_turn_1(
|
||||
|
||||
/** rct2: 0x008A55D4 */
|
||||
static void wooden_wild_mouse_track_right_quarter_turn_1(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wooden_wild_mouse_track_left_quarter_turn_1(session, ride, trackSequence, (direction - 1) & 3, height, trackElement);
|
||||
@@ -591,7 +590,7 @@ static void wooden_wild_mouse_track_right_quarter_turn_1(
|
||||
|
||||
/** rct2: 0x008A55E4 */
|
||||
static void wooden_wild_mouse_track_flat_to_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[2][4][2] = {
|
||||
@@ -613,18 +612,18 @@ static void wooden_wild_mouse_track_flat_to_60_deg_up(
|
||||
uint32_t imageId;
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = imageIds[isChained][direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 2, 32, 25, 1, height, 0, 3, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = imageIds[isChained][direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 6, 2, 24, 43, height, 28, 4, height + 2);
|
||||
imageId = imageIds[isChained][direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = imageIds[isChained][direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 6, 32, 2, 43, height, 0, 4, height);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 29 + direction, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 29 + direction, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
@@ -641,7 +640,7 @@ static void wooden_wild_mouse_track_flat_to_60_deg_up(
|
||||
|
||||
/** rct2: 0x008A55F4 */
|
||||
static void wooden_wild_mouse_track_60_deg_up_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
static constexpr const uint32_t imageIds[2][4][2] = {
|
||||
@@ -663,18 +662,18 @@ static void wooden_wild_mouse_track_60_deg_up_to_flat(
|
||||
uint32_t imageId;
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = imageIds[isChained][direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 2, 32, 25, 1, height, 0, 3, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = imageIds[isChained][direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 6, 2, 24, 43, height, 28, 4, height + 2);
|
||||
imageId = imageIds[isChained][direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = imageIds[isChained][direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 6, 32, 2, 43, height, 0, 4, height);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 33 + direction, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 33 + direction, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
if (direction == 0 || direction == 3)
|
||||
{
|
||||
@@ -691,7 +690,7 @@ static void wooden_wild_mouse_track_60_deg_up_to_flat(
|
||||
|
||||
/** rct2: 0x008A5604 */
|
||||
static void wooden_wild_mouse_track_flat_to_60_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wooden_wild_mouse_track_60_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
@@ -699,7 +698,7 @@ static void wooden_wild_mouse_track_flat_to_60_deg_down(
|
||||
|
||||
/** rct2: 0x008A5614 */
|
||||
static void wooden_wild_mouse_track_60_deg_down_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
wooden_wild_mouse_track_flat_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement);
|
||||
|
||||
@@ -157,10 +157,10 @@ static constexpr const uint32_t car_ride_track_pieces_quarter_turn_3_tiles[4][3]
|
||||
|
||||
/** rct2: 0x006F72C8 */
|
||||
static void paint_car_ride_track_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = car_ride_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = car_ride_track_pieces_flat[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
@@ -180,7 +180,7 @@ static void paint_car_ride_track_flat(
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_0);
|
||||
}
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
@@ -188,10 +188,10 @@ static void paint_car_ride_track_flat(
|
||||
|
||||
/** rct2: 0x006F72D8 */
|
||||
static void paint_car_ride_track_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = car_ride_track_pieces_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = car_ride_track_pieces_25_deg_up[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
@@ -218,7 +218,7 @@ static void paint_car_ride_track_25_deg_up(
|
||||
break;
|
||||
}
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 56, 0x20);
|
||||
@@ -226,10 +226,10 @@ static void paint_car_ride_track_25_deg_up(
|
||||
|
||||
/** rct2: 0x006F72E8 */
|
||||
static void paint_car_ride_track_flat_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = car_ride_track_pieces_flat_to_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = car_ride_track_pieces_flat_to_25_deg_up[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
@@ -256,7 +256,7 @@ static void paint_car_ride_track_flat_to_25_deg_up(
|
||||
break;
|
||||
}
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 3, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 48, 0x20);
|
||||
@@ -264,10 +264,10 @@ static void paint_car_ride_track_flat_to_25_deg_up(
|
||||
|
||||
/** rct2: 0x006F72F8 */
|
||||
static void paint_car_ride_track_25_deg_up_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = car_ride_track_pieces_25_deg_up_to_flat[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = car_ride_track_pieces_25_deg_up_to_flat[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
@@ -294,7 +294,7 @@ static void paint_car_ride_track_25_deg_up_to_flat(
|
||||
break;
|
||||
}
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 6, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 40, 0x20);
|
||||
@@ -302,7 +302,7 @@ static void paint_car_ride_track_25_deg_up_to_flat(
|
||||
|
||||
/** rct2: 0x006F7308 */
|
||||
static void paint_car_ride_track_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_car_ride_track_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -310,7 +310,7 @@ static void paint_car_ride_track_25_deg_down(
|
||||
|
||||
/** rct2: 0x006F7318 */
|
||||
static void paint_car_ride_track_flat_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_car_ride_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -318,7 +318,7 @@ static void paint_car_ride_track_flat_to_25_deg_down(
|
||||
|
||||
/** rct2: 0x006F7328 */
|
||||
static void paint_car_ride_track_25_deg_down_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_car_ride_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -326,23 +326,23 @@ static void paint_car_ride_track_25_deg_down_to_flat(
|
||||
|
||||
/** rct2: 0x006F7338, 0x006F7348, 0x006F7358 */
|
||||
static void paint_car_ride_station(
|
||||
paint_session* session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_STATION_BASE_B_SW_NE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 1 }, { 0, 2, height });
|
||||
}
|
||||
else if (direction == 1 || direction == 3)
|
||||
{
|
||||
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_STATION_BASE_B_NW_SE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 1 }, { 2, 0, height });
|
||||
}
|
||||
|
||||
imageId = car_ride_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = car_ride_track_pieces_flat[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
PaintAddImageAsChild(session, imageId, { 0, 6, height }, { 32, 20, 1 }, { 0, 0, height });
|
||||
@@ -363,13 +363,13 @@ static void paint_car_ride_station(
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
else
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
track_paint_util_draw_station(session, ride, direction, height, trackElement);
|
||||
@@ -380,11 +380,11 @@ static void paint_car_ride_station(
|
||||
|
||||
/** rct2: 0x006F7378 */
|
||||
static void paint_car_ride_track_right_quarter_turn_3_tiles(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
track_paint_util_right_quarter_turn_3_tiles_paint(
|
||||
session, 3, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK],
|
||||
session, 3, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK],
|
||||
car_ride_track_pieces_quarter_turn_3_tiles, defaultRightQuarterTurn3TilesOffsets,
|
||||
defaultRightQuarterTurn3TilesBoundLengths, nullptr);
|
||||
track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_0);
|
||||
@@ -393,7 +393,7 @@ static void paint_car_ride_track_right_quarter_turn_3_tiles(
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -417,7 +417,7 @@ static void paint_car_ride_track_right_quarter_turn_3_tiles(
|
||||
|
||||
/** rct2: 0x006F7368 */
|
||||
static void paint_car_ride_track_left_quarter_turn_3_tiles(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence];
|
||||
@@ -426,10 +426,10 @@ static void paint_car_ride_track_left_quarter_turn_3_tiles(
|
||||
|
||||
/** rct2: 0x006F7388 */
|
||||
static void paint_car_ride_track_left_quarter_turn_1_tile(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = car_ride_track_pieces_left_quarter_turn_1_tile[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = car_ride_track_pieces_left_quarter_turn_1_tile[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
@@ -447,7 +447,7 @@ static void paint_car_ride_track_left_quarter_turn_1_tile(
|
||||
break;
|
||||
}
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0);
|
||||
|
||||
@@ -457,7 +457,7 @@ static void paint_car_ride_track_left_quarter_turn_1_tile(
|
||||
|
||||
/** rct2: 0x006F7398 */
|
||||
static void paint_car_ride_track_right_quarter_turn_1_tile(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_car_ride_track_left_quarter_turn_1_tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement);
|
||||
@@ -465,10 +465,10 @@ static void paint_car_ride_track_right_quarter_turn_1_tile(
|
||||
|
||||
/** rct2: 0x006F73A8 */
|
||||
static void paint_car_ride_track_spinning_tunnel(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = car_ride_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = car_ride_track_pieces_flat[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
@@ -490,7 +490,7 @@ static void paint_car_ride_track_spinning_tunnel(
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_0);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
@@ -498,10 +498,10 @@ static void paint_car_ride_track_spinning_tunnel(
|
||||
|
||||
/** rct2: 0x006F73B8 */
|
||||
static void paint_car_ride_track_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = car_ride_track_pieces_60_deg_up[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = car_ride_track_pieces_60_deg_up[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
@@ -535,9 +535,9 @@ static void paint_car_ride_track_60_deg_up(
|
||||
break;
|
||||
}
|
||||
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 32, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
paint_util_set_segment_support_height(
|
||||
@@ -547,10 +547,10 @@ static void paint_car_ride_track_60_deg_up(
|
||||
|
||||
/** rct2: 0x006F73C8 */
|
||||
static void paint_car_ride_track_25_deg_up_to_60_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = car_ride_track_pieces_25_deg_up_to_60_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = car_ride_track_pieces_25_deg_up_to_60_deg_up[direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
@@ -563,7 +563,7 @@ static void paint_car_ride_track_25_deg_up_to_60_deg_up(
|
||||
|
||||
if (car_ride_track_pieces_25_deg_up_to_60_deg_up[direction][1] != 0)
|
||||
{
|
||||
imageId = car_ride_track_pieces_25_deg_up_to_60_deg_up[direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = car_ride_track_pieces_25_deg_up_to_60_deg_up[direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
@@ -591,9 +591,9 @@ static void paint_car_ride_track_25_deg_up_to_60_deg_up(
|
||||
break;
|
||||
}
|
||||
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 12, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
paint_util_set_segment_support_height(
|
||||
@@ -603,10 +603,10 @@ static void paint_car_ride_track_25_deg_up_to_60_deg_up(
|
||||
|
||||
/** rct2: 0x006F73D8 */
|
||||
static void paint_car_ride_track_60_deg_up_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = car_ride_track_pieces_60_deg_up_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = car_ride_track_pieces_60_deg_up_to_25_deg_up[direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
@@ -619,7 +619,7 @@ static void paint_car_ride_track_60_deg_up_to_25_deg_up(
|
||||
|
||||
if (car_ride_track_pieces_60_deg_up_to_25_deg_up[direction][1] != 0)
|
||||
{
|
||||
imageId = car_ride_track_pieces_60_deg_up_to_25_deg_up[direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = car_ride_track_pieces_60_deg_up_to_25_deg_up[direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
@@ -647,9 +647,9 @@ static void paint_car_ride_track_60_deg_up_to_25_deg_up(
|
||||
break;
|
||||
}
|
||||
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 20, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
paint_util_set_segment_support_height(
|
||||
@@ -659,7 +659,7 @@ static void paint_car_ride_track_60_deg_up_to_25_deg_up(
|
||||
|
||||
/** rct2: 0x006F73E8 */
|
||||
static void paint_car_ride_track_60_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_car_ride_track_60_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -667,7 +667,7 @@ static void paint_car_ride_track_60_deg_down(
|
||||
|
||||
/** rct2: 0x006F73F8 */
|
||||
static void paint_car_ride_track_25_deg_down_to_60_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_car_ride_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -675,7 +675,7 @@ static void paint_car_ride_track_25_deg_down_to_60_deg_down(
|
||||
|
||||
/** rct2: 0x006F7408 */
|
||||
static void paint_car_ride_track_60_deg_down_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_car_ride_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -683,10 +683,10 @@ static void paint_car_ride_track_60_deg_down_to_25_deg_down(
|
||||
|
||||
/** rct2: 0x006F7418 */
|
||||
static void paint_car_ride_track_log_bumps(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = car_ride_track_pieces_log_bumps[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = car_ride_track_pieces_log_bumps[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
@@ -706,7 +706,7 @@ static void paint_car_ride_track_log_bumps(
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_0);
|
||||
}
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
|
||||
static void PaintCircusTent(paint_session* session, const Ride& ride, uint8_t direction, int8_t al, int8_t cl, uint16_t height)
|
||||
static void PaintCircusTent(paint_session& session, const Ride& ride, uint8_t direction, int8_t al, int8_t cl, uint16_t height)
|
||||
{
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session->CurrentlyDrawnItem);
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session.CurrentlyDrawnItem);
|
||||
|
||||
auto rideEntry = ride.GetRideEntry();
|
||||
if (rideEntry == nullptr)
|
||||
@@ -27,12 +27,12 @@ static void PaintCircusTent(paint_session* session, const Ride& ride, uint8_t di
|
||||
auto vehicle = GetEntity<Vehicle>(ride.vehicles[0]);
|
||||
if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr)
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::Entity;
|
||||
session->CurrentlyDrawnItem = vehicle;
|
||||
session.InteractionType = ViewportInteractionItem::Entity;
|
||||
session.CurrentlyDrawnItem = vehicle;
|
||||
}
|
||||
|
||||
auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim);
|
||||
auto imageFlags = session->TrackColours[SCHEME_MISC];
|
||||
auto imageFlags = session.TrackColours[SCHEME_MISC];
|
||||
if (imageFlags != IMAGE_TYPE_REMAP)
|
||||
{
|
||||
imageTemplate = ImageId::FromUInt32(imageFlags);
|
||||
@@ -42,27 +42,27 @@ static void PaintCircusTent(paint_session* session, const Ride& ride, uint8_t di
|
||||
PaintAddImageAsParent(
|
||||
session, imageTemplate.WithIndex(imageIndex), { al, cl, height + 3 }, { 24, 24, 47 }, { al + 16, cl + 16, height + 3 });
|
||||
|
||||
session->CurrentlyDrawnItem = savedTileElement;
|
||||
session->InteractionType = ViewportInteractionItem::Ride;
|
||||
session.CurrentlyDrawnItem = savedTileElement;
|
||||
session.InteractionType = ViewportInteractionItem::Ride;
|
||||
}
|
||||
|
||||
static void PaintCircus(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = track_map_3x3[direction][trackSequence];
|
||||
|
||||
int32_t edges = edges_3x3[trackSequence];
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
|
||||
track_paint_util_paint_floor(session, edges, session->TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_SUPPORTS], height,
|
||||
fenceSpritesRope, session->CurrentRotation);
|
||||
session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_SUPPORTS], height,
|
||||
fenceSpritesRope, session.CurrentRotation);
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
|
||||
@@ -50,9 +50,9 @@ static constexpr const rct_crooked_house_bound_box crooked_house_data[] = {
|
||||
* rct2: 0x0088ABA4
|
||||
*/
|
||||
static void PaintCrookedHouseStructure(
|
||||
paint_session* session, uint8_t direction, int32_t x_offset, int32_t y_offset, uint32_t segment, int32_t height)
|
||||
paint_session& session, uint8_t direction, int32_t x_offset, int32_t y_offset, uint32_t segment, int32_t height)
|
||||
{
|
||||
const TileElement* original_tile_element = static_cast<const TileElement*>(session->CurrentlyDrawnItem);
|
||||
const TileElement* original_tile_element = static_cast<const TileElement*>(session.CurrentlyDrawnItem);
|
||||
|
||||
auto ride = get_ride(original_tile_element->AsTrack()->GetRideIndex());
|
||||
if (ride == nullptr)
|
||||
@@ -67,13 +67,13 @@ static void PaintCrookedHouseStructure(
|
||||
auto vehicle = GetEntity<Vehicle>(ride->vehicles[0]);
|
||||
if (vehicle != nullptr)
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::Entity;
|
||||
session->CurrentlyDrawnItem = vehicle;
|
||||
session.InteractionType = ViewportInteractionItem::Entity;
|
||||
session.CurrentlyDrawnItem = vehicle;
|
||||
}
|
||||
}
|
||||
|
||||
const auto& boundBox = crooked_house_data[segment];
|
||||
auto imageTemplate = ImageId::FromUInt32(session->TrackColours[SCHEME_MISC]);
|
||||
auto imageTemplate = ImageId::FromUInt32(session.TrackColours[SCHEME_MISC]);
|
||||
auto imageIndex = rideEntry->vehicles[0].base_image_id + direction;
|
||||
PaintAddImageAsParent(
|
||||
session, imageTemplate.WithIndex(imageIndex), { x_offset, y_offset, height + 3 }, { boundBox.length, 127 },
|
||||
@@ -81,22 +81,22 @@ static void PaintCrookedHouseStructure(
|
||||
}
|
||||
|
||||
static void PaintCrookedHouse(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = track_map_3x3[direction][trackSequence];
|
||||
|
||||
int32_t edges = edges_3x3[trackSequence];
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
|
||||
track_paint_util_paint_floor(session, edges, session->TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_MISC], height, fenceSpritesRope,
|
||||
session->CurrentRotation);
|
||||
session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_MISC], height, fenceSpritesRope,
|
||||
session.CurrentRotation);
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
|
||||
@@ -34,9 +34,9 @@ static constexpr const uint32_t dodgems_fence_sprites[] = {
|
||||
SPR_DODGEMS_FENCE_TOP_LEFT,
|
||||
};
|
||||
|
||||
static void paint_dodgems_roof(paint_session* session, int32_t height, int32_t offset)
|
||||
static void paint_dodgems_roof(paint_session& session, int32_t height, int32_t offset)
|
||||
{
|
||||
uint32_t image_id = (SPR_DODGEMS_ROOF_FRAME + offset) | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t image_id = (SPR_DODGEMS_ROOF_FRAME + offset) | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 32, 2 });
|
||||
|
||||
image_id = (SPR_DODGEMS_ROOF_GLASS + offset) | (EnumValue(FilterPaletteID::PaletteDarken3) << 19) | IMAGE_TYPE_TRANSPARENT;
|
||||
@@ -44,25 +44,25 @@ static void paint_dodgems_roof(paint_session* session, int32_t height, int32_t o
|
||||
}
|
||||
|
||||
static void paint_dodgems(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint8_t relativeTrackSequence = track_map_4x4[direction][trackSequence];
|
||||
|
||||
int32_t edges = edges_4x4[relativeTrackSequence];
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
|
||||
if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
|
||||
{
|
||||
uint32_t imageId = SPR_DODGEMS_FLOOR | session->TrackColours[SCHEME_SUPPORTS];
|
||||
uint32_t imageId = SPR_DODGEMS_FLOOR | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 30, 1 }, { 1, 1, height });
|
||||
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_SUPPORTS], height,
|
||||
dodgems_fence_sprites, session->CurrentRotation);
|
||||
session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_SUPPORTS], height,
|
||||
dodgems_fence_sprites, session.CurrentRotation);
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ static constexpr ferris_wheel_bound_box FerrisWheelData[] = {
|
||||
};
|
||||
|
||||
static void PaintFerrisWheelRiders(
|
||||
paint_session* session, const rct_ride_entry& rideEntry, const Vehicle& vehicle, uint8_t direction, const CoordsXYZ offset,
|
||||
paint_session& session, const rct_ride_entry& rideEntry, const Vehicle& vehicle, uint8_t direction, const CoordsXYZ offset,
|
||||
const CoordsXYZ bbLength, const CoordsXYZ bbOffset)
|
||||
{
|
||||
for (int32_t i = 0; i < 32; i += 2)
|
||||
@@ -64,9 +64,9 @@ static void PaintFerrisWheelRiders(
|
||||
}
|
||||
|
||||
static void PaintFerrisWheelStructure(
|
||||
paint_session* session, const Ride& ride, uint8_t direction, int8_t axisOffset, uint16_t height)
|
||||
paint_session& session, const Ride& ride, uint8_t direction, int8_t axisOffset, uint16_t height)
|
||||
{
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session->CurrentlyDrawnItem);
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session.CurrentlyDrawnItem);
|
||||
|
||||
auto rideEntry = ride.GetRideEntry();
|
||||
if (rideEntry == nullptr)
|
||||
@@ -75,8 +75,8 @@ static void PaintFerrisWheelStructure(
|
||||
auto vehicle = GetEntity<Vehicle>(ride.vehicles[0]);
|
||||
if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr)
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::Entity;
|
||||
session->CurrentlyDrawnItem = vehicle;
|
||||
session.InteractionType = ViewportInteractionItem::Entity;
|
||||
session.CurrentlyDrawnItem = vehicle;
|
||||
}
|
||||
|
||||
const auto& boundBox = FerrisWheelData[direction];
|
||||
@@ -84,9 +84,9 @@ static void PaintFerrisWheelStructure(
|
||||
CoordsXYZ bbLength(boundBox.length.x, boundBox.length.y, 127);
|
||||
CoordsXYZ bbOffset(boundBox.offset.x, boundBox.offset.y, height + 7);
|
||||
|
||||
auto supportsImageTemplate = ImageId::FromUInt32(session->TrackColours[SCHEME_TRACK]);
|
||||
auto supportsImageTemplate = ImageId::FromUInt32(session.TrackColours[SCHEME_TRACK]);
|
||||
auto wheelImageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim);
|
||||
auto wheelImageFlags = session->TrackColours[SCHEME_MISC];
|
||||
auto wheelImageFlags = session.TrackColours[SCHEME_MISC];
|
||||
if (wheelImageFlags != IMAGE_TYPE_REMAP)
|
||||
{
|
||||
wheelImageTemplate = ImageId::FromUInt32(wheelImageFlags);
|
||||
@@ -105,12 +105,12 @@ static void PaintFerrisWheelStructure(
|
||||
}
|
||||
PaintAddImageAsChild(session, rightSupportImageId, offset, bbLength, bbOffset);
|
||||
|
||||
session->CurrentlyDrawnItem = savedTileElement;
|
||||
session->InteractionType = ViewportInteractionItem::Ride;
|
||||
session.CurrentlyDrawnItem = savedTileElement;
|
||||
session.InteractionType = ViewportInteractionItem::Ride;
|
||||
}
|
||||
|
||||
static void PaintFerrisWheel(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint8_t relativeTrackSequence = track_map_1x4[direction][trackSequence];
|
||||
@@ -125,33 +125,33 @@ static void PaintFerrisWheel(
|
||||
edges = edges_1x4_ne_sw[relativeTrackSequence];
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
|
||||
track_paint_util_paint_floor(session, edges, session->TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
|
||||
uint32_t imageId;
|
||||
uint8_t rotation = session->CurrentRotation;
|
||||
uint32_t colourFlags = session->TrackColours[SCHEME_MISC];
|
||||
uint8_t rotation = session.CurrentRotation;
|
||||
uint32_t colourFlags = session.TrackColours[SCHEME_MISC];
|
||||
|
||||
if (edges & EDGE_NW && track_paint_util_has_fence(EDGE_NW, session->MapPosition, trackElement, ride, rotation))
|
||||
if (edges & EDGE_NW && track_paint_util_has_fence(EDGE_NW, session.MapPosition, trackElement, ride, rotation))
|
||||
{
|
||||
imageId = SPR_FENCE_ROPE_NW | colourFlags;
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 32, 1, 7, height, 0, 2, height + 2);
|
||||
}
|
||||
if (edges & EDGE_NE && track_paint_util_has_fence(EDGE_NE, session->MapPosition, trackElement, ride, rotation))
|
||||
if (edges & EDGE_NE && track_paint_util_has_fence(EDGE_NE, session.MapPosition, trackElement, ride, rotation))
|
||||
{
|
||||
imageId = SPR_FENCE_ROPE_NE | colourFlags;
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 1, 32, 7, height, 2, 0, height + 2);
|
||||
}
|
||||
if (edges & EDGE_SE && track_paint_util_has_fence(EDGE_SE, session->MapPosition, trackElement, ride, rotation))
|
||||
if (edges & EDGE_SE && track_paint_util_has_fence(EDGE_SE, session.MapPosition, trackElement, ride, rotation))
|
||||
{
|
||||
// Bound box is slightly different from track_paint_util_paint_fences
|
||||
imageId = SPR_FENCE_ROPE_SE | colourFlags;
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 1, 7 }, { 0, 29, height + 3 });
|
||||
}
|
||||
if (edges & EDGE_SW && track_paint_util_has_fence(EDGE_SW, session->MapPosition, trackElement, ride, rotation))
|
||||
if (edges & EDGE_SW && track_paint_util_has_fence(EDGE_SW, session.MapPosition, trackElement, ride, rotation))
|
||||
{
|
||||
imageId = SPR_FENCE_ROPE_SW | colourFlags;
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 7 }, { 30, 0, height + 2 });
|
||||
|
||||
@@ -35,26 +35,26 @@ static constexpr const uint32_t flying_saucers_fence_sprites[] = {
|
||||
* rct2: 0x008873D8
|
||||
*/
|
||||
static void paint_flying_saucers(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint8_t relativeTrackSequence = track_map_4x4[direction][trackSequence];
|
||||
|
||||
int32_t edges = edges_4x4[relativeTrackSequence];
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
|
||||
if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
|
||||
{
|
||||
uint32_t imageId = SPR_FLYING_SAUCERS_FLOOR | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = SPR_FLYING_SAUCERS_FLOOR | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 30, 1 }, { 1, 1, height });
|
||||
}
|
||||
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_TRACK], height,
|
||||
flying_saucers_fence_sprites, session->CurrentRotation);
|
||||
session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_TRACK], height,
|
||||
flying_saucers_fence_sprites, session.CurrentRotation);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 48, 0x20);
|
||||
|
||||
@@ -177,19 +177,19 @@ static uint8_t get_tunnel_doors_image_straight_flat(const TrackElement& trackEle
|
||||
|
||||
/** rct2: 0x00770BEC */
|
||||
static void paint_ghost_train_track_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = ghost_train_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = ghost_train_track_pieces_flat[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
|
||||
auto tunnelImage = get_tunnel_doors_image_straight_flat(trackElement, direction);
|
||||
paint_util_push_tunnel_rotated(session, direction, height, tunnelImage);
|
||||
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
paint_util_set_segment_support_height(
|
||||
@@ -199,18 +199,18 @@ static void paint_ghost_train_track_flat(
|
||||
|
||||
/** rct2: 0x00770BFC */
|
||||
static void paint_ghost_train_track_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = ghost_train_track_pieces_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = ghost_train_track_pieces_25_deg_up[direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
|
||||
imageId = ghost_train_track_pieces_25_deg_up[direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = ghost_train_track_pieces_25_deg_up[direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 1, 23, height, 0, 27, height);
|
||||
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
switch (direction)
|
||||
@@ -236,7 +236,7 @@ static void paint_ghost_train_track_25_deg_up(
|
||||
|
||||
/** rct2: 0x00770C0C */
|
||||
static void paint_ghost_train_track_flat_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
bool isBackwards = trackElement.GetTrackType() == TrackElemType::Down25ToFlat;
|
||||
@@ -250,15 +250,15 @@ static void paint_ghost_train_track_flat_to_25_deg_up(
|
||||
doorImage = doorOpeningOutwardsToImage[trackElement.GetDoorBState()];
|
||||
}
|
||||
|
||||
uint32_t imageId = ghost_train_track_pieces_flat_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = ghost_train_track_pieces_flat_to_25_deg_up[direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
|
||||
imageId = ghost_train_track_pieces_flat_to_25_deg_up[direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = ghost_train_track_pieces_flat_to_25_deg_up[direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 1, 15, height, 0, 27, height);
|
||||
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 3, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
switch (direction)
|
||||
@@ -283,18 +283,18 @@ static void paint_ghost_train_track_flat_to_25_deg_up(
|
||||
}
|
||||
|
||||
static void paint_ghost_train_track_25_deg_up_to_flat_shared(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = ghost_train_track_pieces_25_deg_up_to_flat[direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = ghost_train_track_pieces_25_deg_up_to_flat[direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
|
||||
imageId = ghost_train_track_pieces_25_deg_up_to_flat[direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = ghost_train_track_pieces_25_deg_up_to_flat[direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 1, 15, height, 0, 27, height);
|
||||
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 6, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
paint_util_set_segment_support_height(
|
||||
@@ -304,7 +304,7 @@ static void paint_ghost_train_track_25_deg_up_to_flat_shared(
|
||||
|
||||
/** rct2: 0x00770C1C */
|
||||
static void paint_ghost_train_track_25_deg_up_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_ghost_train_track_25_deg_up_to_flat_shared(session, ride, trackSequence, direction, height, trackElement);
|
||||
@@ -328,7 +328,7 @@ static void paint_ghost_train_track_25_deg_up_to_flat(
|
||||
|
||||
/** rct2: 0x00770C2C */
|
||||
static void paint_ghost_train_track_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_ghost_train_track_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -336,7 +336,7 @@ static void paint_ghost_train_track_25_deg_down(
|
||||
|
||||
/** rct2: 0x00770C3C */
|
||||
static void paint_ghost_train_track_flat_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_ghost_train_track_25_deg_up_to_flat_shared(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -360,7 +360,7 @@ static void paint_ghost_train_track_flat_to_25_deg_down(
|
||||
|
||||
/** rct2: 0x00770C4C */
|
||||
static void paint_ghost_train_track_25_deg_down_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_ghost_train_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -368,7 +368,7 @@ static void paint_ghost_train_track_25_deg_down_to_flat(
|
||||
|
||||
/** rct2: 0x00770C5C, 0x00770C6C, 0x00770C7C */
|
||||
static void paint_ghost_train_station(
|
||||
paint_session* session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
@@ -380,23 +380,23 @@ static void paint_ghost_train_station(
|
||||
SPR_STATION_BASE_B_NW_SE,
|
||||
};
|
||||
|
||||
imageId = imageIds[direction] | session->TrackColours[SCHEME_MISC];
|
||||
imageId = imageIds[direction] | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 28, 3, height - 2, 0, 2, height);
|
||||
|
||||
imageId = ghost_train_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = ghost_train_track_pieces_flat[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChildRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 0, height);
|
||||
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
else
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
track_paint_util_draw_station(session, ride, direction, height, trackElement);
|
||||
@@ -407,11 +407,11 @@ static void paint_ghost_train_station(
|
||||
|
||||
/** rct2: 0x00770C9C */
|
||||
static void paint_ghost_train_track_right_quarter_turn_3_tiles(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
track_paint_util_right_quarter_turn_3_tiles_paint(
|
||||
session, 3, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK],
|
||||
session, 3, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK],
|
||||
ghost_train_track_pieces_quarter_turn_3_tiles, nullptr, defaultRightQuarterTurn3TilesBoundLengths,
|
||||
defaultRightQuarterTurn3TilesBoundOffsets);
|
||||
bool isBackwards = trackElement.GetTrackType() == TrackElemType::LeftQuarterTurn3Tiles;
|
||||
@@ -424,7 +424,7 @@ static void paint_ghost_train_track_right_quarter_turn_3_tiles(
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -448,7 +448,7 @@ static void paint_ghost_train_track_right_quarter_turn_3_tiles(
|
||||
|
||||
/** rct2: 0x00770CAC */
|
||||
static void paint_ghost_train_track_left_quarter_turn_3_tiles(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence];
|
||||
@@ -457,7 +457,7 @@ static void paint_ghost_train_track_left_quarter_turn_3_tiles(
|
||||
|
||||
/** rct2: 0x00770CAC */
|
||||
static void paint_ghost_train_track_left_quarter_turn_1_tile(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
bool isBackwards = trackElement.GetTrackType() == TrackElemType::RightQuarterTurn1Tile;
|
||||
@@ -474,17 +474,17 @@ static void paint_ghost_train_track_left_quarter_turn_1_tile(
|
||||
}
|
||||
|
||||
track_paint_util_left_quarter_turn_1_tile_paint(
|
||||
session, 3, height, 0, direction, session->TrackColours[SCHEME_TRACK], ghost_train_track_pieces_quarter_turn_1_tile);
|
||||
session, 3, height, 0, direction, session.TrackColours[SCHEME_TRACK], ghost_train_track_pieces_quarter_turn_1_tile);
|
||||
track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, 0, tunnelStartImage, 0, tunnelEndImage);
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
}
|
||||
|
||||
/** rct2: 0x00770CBC */
|
||||
static void paint_ghost_train_track_right_quarter_turn_1_tile(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_ghost_train_track_left_quarter_turn_1_tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement);
|
||||
@@ -492,10 +492,10 @@ static void paint_ghost_train_track_right_quarter_turn_1_tile(
|
||||
|
||||
/** rct2: 0x00770CCC */
|
||||
static void paint_ghost_train_track_spinning_tunnel(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = ghost_train_track_pieces_spinning_tunnel_track[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = ghost_train_track_pieces_spinning_tunnel_track[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 28, 20, 3, height, 2, 6, height);
|
||||
|
||||
@@ -504,7 +504,7 @@ static void paint_ghost_train_track_spinning_tunnel(
|
||||
auto tunnelImage = get_tunnel_doors_image_straight_flat(trackElement, direction);
|
||||
paint_util_push_tunnel_rotated(session, direction, height, tunnelImage);
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
@@ -512,19 +512,19 @@ static void paint_ghost_train_track_spinning_tunnel(
|
||||
|
||||
/** rct2: 0x00770CDC */
|
||||
static void paint_ghost_train_track_brakes(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = ghost_train_track_pieces_brakes[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = ghost_train_track_pieces_brakes[direction] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
|
||||
|
||||
auto tunnelImage = get_tunnel_doors_image_straight_flat(trackElement, direction);
|
||||
paint_util_push_tunnel_rotated(session, direction, height, tunnelImage);
|
||||
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
paint_util_set_segment_support_height(
|
||||
|
||||
@@ -29,9 +29,9 @@ static constexpr haunted_house_bound_box haunted_house_data[] = {
|
||||
};
|
||||
|
||||
static void PaintHauntedHouseStructure(
|
||||
paint_session* session, const Ride& ride, uint8_t direction, int8_t xOffset, int8_t yOffset, uint8_t part, uint16_t height)
|
||||
paint_session& session, const Ride& ride, uint8_t direction, int8_t xOffset, int8_t yOffset, uint8_t part, uint16_t height)
|
||||
{
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session->CurrentlyDrawnItem);
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session.CurrentlyDrawnItem);
|
||||
|
||||
uint8_t frameNum = 0;
|
||||
|
||||
@@ -42,20 +42,20 @@ static void PaintHauntedHouseStructure(
|
||||
auto vehicle = GetEntity<Vehicle>(ride.vehicles[0]);
|
||||
if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr)
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::Entity;
|
||||
session->CurrentlyDrawnItem = vehicle;
|
||||
session.InteractionType = ViewportInteractionItem::Entity;
|
||||
session.CurrentlyDrawnItem = vehicle;
|
||||
frameNum = vehicle->Pitch;
|
||||
}
|
||||
|
||||
const auto& boundBox = haunted_house_data[part];
|
||||
auto imageTemplate = ImageId::FromUInt32(session->TrackColours[SCHEME_MISC]);
|
||||
auto imageTemplate = ImageId::FromUInt32(session.TrackColours[SCHEME_MISC]);
|
||||
auto baseImageIndex = rideEntry->vehicles[0].base_image_id;
|
||||
auto imageIndex = baseImageIndex + direction;
|
||||
PaintAddImageAsParent(
|
||||
session, imageTemplate.WithIndex(imageIndex), { xOffset, yOffset, height }, { boundBox.length, 127 },
|
||||
{ boundBox.offset, height });
|
||||
|
||||
if (session->DPI.zoom_level <= ZoomLevel{ 0 } && frameNum != 0)
|
||||
if (session.DPI.zoom_level <= ZoomLevel{ 0 } && frameNum != 0)
|
||||
{
|
||||
imageIndex = baseImageIndex + 3 + ((direction & 3) * 18) + frameNum;
|
||||
PaintAddImageAsChild(
|
||||
@@ -63,27 +63,27 @@ static void PaintHauntedHouseStructure(
|
||||
{ boundBox.length.x, boundBox.length.y, 127 }, { boundBox.offset.x, boundBox.offset.y, height });
|
||||
}
|
||||
|
||||
session->CurrentlyDrawnItem = savedTileElement;
|
||||
session->InteractionType = ViewportInteractionItem::Ride;
|
||||
session.CurrentlyDrawnItem = savedTileElement;
|
||||
session.InteractionType = ViewportInteractionItem::Ride;
|
||||
}
|
||||
|
||||
static void PaintHauntedHouse(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = track_map_3x3[direction][trackSequence];
|
||||
|
||||
int32_t edges = edges_3x3[trackSequence];
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
|
||||
track_paint_util_paint_floor(session, edges, session->TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_MISC], height, fenceSpritesRope,
|
||||
session->CurrentRotation);
|
||||
session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_MISC], height, fenceSpritesRope,
|
||||
session.CurrentRotation);
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
|
||||
@@ -47,18 +47,18 @@ enum
|
||||
* rct: 0x004ACF4A
|
||||
*/
|
||||
static void maze_paint_setup(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint16_t maze_entry = trackElement.GetMazeEntry();
|
||||
maze_entry = Numerics::rol16(maze_entry, direction * 4);
|
||||
|
||||
uint32_t rotation = session->CurrentRotation;
|
||||
uint32_t rotation = session.CurrentRotation;
|
||||
// draw ground
|
||||
int32_t image_id = SPR_TERRAIN_DIRT | session->TrackColours[SCHEME_MISC];
|
||||
int32_t image_id = SPR_TERRAIN_DIRT | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 32, 0 });
|
||||
|
||||
wooden_a_supports_paint_setup(session, (rotation & 1) ? 0 : 1, 0, height, session->TrackColours[SCHEME_3]);
|
||||
wooden_a_supports_paint_setup(session, (rotation & 1) ? 0 : 1, 0, height, session.TrackColours[SCHEME_3]);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL & ~SEGMENT_C4, 0xFFFF, 0);
|
||||
|
||||
@@ -79,7 +79,7 @@ static void maze_paint_setup(
|
||||
break;
|
||||
}
|
||||
|
||||
base_image_id |= session->TrackColours[SCHEME_MISC];
|
||||
base_image_id |= session.TrackColours[SCHEME_MISC];
|
||||
|
||||
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_CENTRE;
|
||||
if (maze_entry & MAZE_ENTRY_FLAG_3)
|
||||
|
||||
@@ -26,10 +26,10 @@ static constexpr const uint16_t MerryGoRoundBreakdownVibration[] = {
|
||||
};
|
||||
|
||||
static void PaintRiders(
|
||||
paint_session* session, const Ride& ride, const rct_ride_entry& rideEntry, const Vehicle& vehicle, int32_t rotationOffset,
|
||||
paint_session& session, const Ride& ride, const rct_ride_entry& rideEntry, const Vehicle& vehicle, int32_t rotationOffset,
|
||||
const CoordsXYZ& offset, const CoordsXYZ& bbLength, const CoordsXYZ& bbOffset)
|
||||
{
|
||||
if (session->DPI.zoom_level > ZoomLevel{ 0 })
|
||||
if (session.DPI.zoom_level > ZoomLevel{ 0 })
|
||||
return;
|
||||
if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK))
|
||||
return;
|
||||
@@ -51,9 +51,9 @@ static void PaintRiders(
|
||||
}
|
||||
|
||||
static void PaintCarousel(
|
||||
paint_session* session, const Ride& ride, uint8_t direction, int8_t xOffset, int8_t yOffset, uint16_t height)
|
||||
paint_session& session, const Ride& ride, uint8_t direction, int8_t xOffset, int8_t yOffset, uint16_t height)
|
||||
{
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session->CurrentlyDrawnItem);
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session.CurrentlyDrawnItem);
|
||||
height += 7;
|
||||
|
||||
auto rideEntry = ride.GetRideEntry();
|
||||
@@ -63,8 +63,8 @@ static void PaintCarousel(
|
||||
auto vehicle = GetEntity<Vehicle>(ride.vehicles[0]);
|
||||
if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr)
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::Entity;
|
||||
session->CurrentlyDrawnItem = vehicle;
|
||||
session.InteractionType = ViewportInteractionItem::Entity;
|
||||
session.CurrentlyDrawnItem = vehicle;
|
||||
|
||||
if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)
|
||||
&& ride.breakdown_reason_pending == BREAKDOWN_CONTROL_FAILURE && ride.breakdown_sound_modifier >= 128)
|
||||
@@ -76,7 +76,7 @@ static void PaintCarousel(
|
||||
auto rotationOffset = 0;
|
||||
if (vehicle != nullptr)
|
||||
{
|
||||
auto rotation = ((vehicle->sprite_direction >> 3) + session->CurrentRotation) << 5;
|
||||
auto rotation = ((vehicle->sprite_direction >> 3) + session.CurrentRotation) << 5;
|
||||
rotationOffset = (vehicle->Pitch + rotation) % 128;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ static void PaintCarousel(
|
||||
CoordsXYZ bbOffset(xOffset + 16, yOffset + 16, height);
|
||||
|
||||
auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim);
|
||||
auto imageFlags = session->TrackColours[SCHEME_MISC];
|
||||
auto imageFlags = session.TrackColours[SCHEME_MISC];
|
||||
if (imageFlags != IMAGE_TYPE_REMAP)
|
||||
{
|
||||
imageTemplate = ImageId::FromUInt32(imageFlags);
|
||||
@@ -96,27 +96,27 @@ static void PaintCarousel(
|
||||
|
||||
PaintRiders(session, ride, *rideEntry, *vehicle, rotationOffset, offset, bbLength, bbOffset);
|
||||
|
||||
session->CurrentlyDrawnItem = savedTileElement;
|
||||
session->InteractionType = ViewportInteractionItem::Ride;
|
||||
session.CurrentlyDrawnItem = savedTileElement;
|
||||
session.InteractionType = ViewportInteractionItem::Ride;
|
||||
}
|
||||
|
||||
static void PaintMerryGoRound(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = track_map_3x3[direction][trackSequence];
|
||||
|
||||
int32_t edges = edges_3x3[trackSequence];
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
|
||||
track_paint_util_paint_floor(session, edges, session->TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_MISC], height, fenceSpritesRope,
|
||||
session->CurrentRotation);
|
||||
session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_MISC], height, fenceSpritesRope,
|
||||
session.CurrentRotation);
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
|
||||
@@ -444,7 +444,7 @@ const size_t mini_golf_peep_animation_lengths[] = {
|
||||
// clang-format on
|
||||
|
||||
static paint_struct* mini_golf_paint_util_7c(
|
||||
paint_session* session, uint8_t direction, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x,
|
||||
paint_session& session, uint8_t direction, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x,
|
||||
int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x,
|
||||
int16_t bound_box_offset_y, int16_t bound_box_offset_z, uint32_t rotation)
|
||||
{
|
||||
@@ -460,15 +460,15 @@ static paint_struct* mini_golf_paint_util_7c(
|
||||
{ bound_box_offset_x, bound_box_offset_y, bound_box_offset_z });
|
||||
}
|
||||
|
||||
static bool mini_golf_paint_util_should_draw_fence(paint_session* session, const TrackElement& trackElement)
|
||||
static bool mini_golf_paint_util_should_draw_fence(paint_session& session, const TrackElement& trackElement)
|
||||
{
|
||||
if (!session->DidPassSurface)
|
||||
if (!session.DidPassSurface)
|
||||
{
|
||||
// Should be above ground (have passed surface rendering)
|
||||
return false;
|
||||
}
|
||||
|
||||
const TileElement* surfaceElement = session->SurfaceElement;
|
||||
const TileElement* surfaceElement = session.SurfaceElement;
|
||||
if (surfaceElement->base_height != trackElement.base_height)
|
||||
{
|
||||
return true;
|
||||
@@ -484,25 +484,25 @@ static bool mini_golf_paint_util_should_draw_fence(paint_session* session, const
|
||||
|
||||
/** rct2: 0x0087F10C */
|
||||
static void paint_mini_golf_track_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
|
||||
if (direction & 1)
|
||||
{
|
||||
imageId = SPR_MINI_GOLF_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_MINI_GOLF_FLAT_NW_SE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height });
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_PATH_AND_MINI_GOLF);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = SPR_MINI_GOLF_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_MINI_GOLF_FLAT_SW_NE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height });
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_PATH_AND_MINI_GOLF);
|
||||
}
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0);
|
||||
|
||||
@@ -510,18 +510,18 @@ static void paint_mini_golf_track_flat(
|
||||
{
|
||||
if (direction & 1)
|
||||
{
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_NW_SE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_NW_SE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 7 }, { 10, 0, height + 2 });
|
||||
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_NW_SE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_NW_SE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 7 }, { 22, 0, height + 2 });
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_SW_NE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_SW_NE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 7 }, { 0, 10, height + 2 });
|
||||
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_SW_NE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_SW_NE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 7 }, { 0, 22, height + 2 });
|
||||
}
|
||||
}
|
||||
@@ -531,23 +531,23 @@ static void paint_mini_golf_track_flat(
|
||||
|
||||
/** rct2: 0x0087F11C */
|
||||
static void paint_mini_golf_track_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
|
||||
imageId = mini_golf_track_sprites_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session->CurrentRotation);
|
||||
imageId = mini_golf_track_sprites_25_deg_up[direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session.CurrentRotation);
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0);
|
||||
|
||||
imageId = mini_golf_track_sprites_25_deg_up[direction][1] | session->TrackColours[SCHEME_MISC];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 1, 15, height, 0, 10, height + 2, session->CurrentRotation);
|
||||
imageId = mini_golf_track_sprites_25_deg_up[direction][1] | session.TrackColours[SCHEME_MISC];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 1, 15, height, 0, 10, height + 2, session.CurrentRotation);
|
||||
|
||||
imageId = mini_golf_track_sprites_25_deg_up[direction][2] | session->TrackColours[SCHEME_MISC];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 1, 15, height, 0, 22, height + 2, session->CurrentRotation);
|
||||
imageId = mini_golf_track_sprites_25_deg_up[direction][2] | session.TrackColours[SCHEME_MISC];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 1, 15, height, 0, 22, height + 2, session.CurrentRotation);
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
@@ -570,23 +570,23 @@ static void paint_mini_golf_track_25_deg_up(
|
||||
|
||||
/** rct2: 0x0087F12C */
|
||||
static void paint_mini_golf_track_flat_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
|
||||
imageId = mini_golf_track_sprites_flat_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session->CurrentRotation);
|
||||
imageId = mini_golf_track_sprites_flat_to_25_deg_up[direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session.CurrentRotation);
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0);
|
||||
|
||||
imageId = mini_golf_track_sprites_flat_to_25_deg_up[direction][1] | session->TrackColours[SCHEME_MISC];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 1, 11, height, 0, 10, height + 2, session->CurrentRotation);
|
||||
imageId = mini_golf_track_sprites_flat_to_25_deg_up[direction][1] | session.TrackColours[SCHEME_MISC];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 1, 11, height, 0, 10, height + 2, session.CurrentRotation);
|
||||
|
||||
imageId = mini_golf_track_sprites_flat_to_25_deg_up[direction][2] | session->TrackColours[SCHEME_MISC];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 1, 11, height, 0, 22, height + 2, session->CurrentRotation);
|
||||
imageId = mini_golf_track_sprites_flat_to_25_deg_up[direction][2] | session.TrackColours[SCHEME_MISC];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 1, 11, height, 0, 22, height + 2, session.CurrentRotation);
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
@@ -609,23 +609,23 @@ static void paint_mini_golf_track_flat_to_25_deg_up(
|
||||
|
||||
/** rct2: 0x0087F13C */
|
||||
static void paint_mini_golf_track_25_deg_up_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
|
||||
imageId = mini_golf_track_sprites_25_deg_up_to_flat[direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session->CurrentRotation);
|
||||
imageId = mini_golf_track_sprites_25_deg_up_to_flat[direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session.CurrentRotation);
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0);
|
||||
|
||||
imageId = mini_golf_track_sprites_25_deg_up_to_flat[direction][1] | session->TrackColours[SCHEME_MISC];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 1, 11, height, 0, 10, height + 2, session->CurrentRotation);
|
||||
imageId = mini_golf_track_sprites_25_deg_up_to_flat[direction][1] | session.TrackColours[SCHEME_MISC];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 1, 11, height, 0, 10, height + 2, session.CurrentRotation);
|
||||
|
||||
imageId = mini_golf_track_sprites_25_deg_up_to_flat[direction][2] | session->TrackColours[SCHEME_MISC];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 1, 11, height, 0, 22, height + 2, session->CurrentRotation);
|
||||
imageId = mini_golf_track_sprites_25_deg_up_to_flat[direction][2] | session.TrackColours[SCHEME_MISC];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 1, 11, height, 0, 22, height + 2, session.CurrentRotation);
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
@@ -648,7 +648,7 @@ static void paint_mini_golf_track_25_deg_up_to_flat(
|
||||
|
||||
/** rct2: 0x0087F14C */
|
||||
static void paint_mini_golf_track_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_mini_golf_track_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -656,7 +656,7 @@ static void paint_mini_golf_track_25_deg_down(
|
||||
|
||||
/** rct2: 0x0087F15C */
|
||||
static void paint_mini_golf_track_flat_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_mini_golf_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -664,7 +664,7 @@ static void paint_mini_golf_track_flat_to_25_deg_down(
|
||||
|
||||
/** rct2: 0x0087F16C */
|
||||
static void paint_mini_golf_track_25_deg_down_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_mini_golf_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -672,30 +672,29 @@ static void paint_mini_golf_track_25_deg_down_to_flat(
|
||||
|
||||
/** rct2: 0x0087F17C, 0x0087F18C, 0x0087F19C */
|
||||
static void paint_mini_golf_station(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
const auto* stationObj = ride.GetStationObject();
|
||||
uint32_t imageId;
|
||||
bool hasFence;
|
||||
|
||||
imageId = SPR_MINI_GOLF_STATION_FLOOR | session->TrackColours[SCHEME_TRACK];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 28, 1, height, 0, 0, height, session->CurrentRotation);
|
||||
imageId = SPR_MINI_GOLF_STATION_FLOOR | session.TrackColours[SCHEME_TRACK];
|
||||
mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 28, 1, height, 0, 0, height, session.CurrentRotation);
|
||||
|
||||
if (direction & 1)
|
||||
{
|
||||
hasFence = track_paint_util_has_fence(EDGE_NE, session->MapPosition, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_NE, session.MapPosition, trackElement, ride, session.CurrentRotation);
|
||||
if (hasFence)
|
||||
{
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_NW_SE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_NW_SE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { -10, 0, height }, { 1, 32, 7 }, { 0, 0, height + 2 });
|
||||
}
|
||||
|
||||
bool hasSWFence = track_paint_util_has_fence(
|
||||
EDGE_SW, session->MapPosition, trackElement, ride, session->CurrentRotation);
|
||||
bool hasSWFence = track_paint_util_has_fence(EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation);
|
||||
if (hasFence)
|
||||
{
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_NW_SE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_NW_SE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 10, 0, height }, { 1, 32, 7 }, { 31, 0, height + 2 });
|
||||
}
|
||||
|
||||
@@ -707,18 +706,17 @@ static void paint_mini_golf_station(
|
||||
}
|
||||
else
|
||||
{
|
||||
hasFence = track_paint_util_has_fence(EDGE_NW, session->MapPosition, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_NW, session.MapPosition, trackElement, ride, session.CurrentRotation);
|
||||
if (hasFence)
|
||||
{
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_SW_NE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_SW_NE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, -10, height }, { 32, 1, 7 }, { 0, 0, height + 2 });
|
||||
}
|
||||
|
||||
bool hasSEFence = track_paint_util_has_fence(
|
||||
EDGE_SE, session->MapPosition, trackElement, ride, session->CurrentRotation);
|
||||
bool hasSEFence = track_paint_util_has_fence(EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation);
|
||||
if (hasFence)
|
||||
{
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_SW_NE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_SW_NE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 10, height }, { 32, 1, 7 }, { 0, 31, height + 2 });
|
||||
}
|
||||
|
||||
@@ -728,7 +726,7 @@ static void paint_mini_golf_station(
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
@@ -736,15 +734,15 @@ static void paint_mini_golf_station(
|
||||
|
||||
/** rct2: 0x0087F1AC */
|
||||
static void paint_mini_golf_track_left_quarter_turn_1_tile(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
|
||||
track_paint_util_left_quarter_turn_1_tile_paint(
|
||||
session, 1, height, 0, direction, session->TrackColours[SCHEME_TRACK], mini_golf_track_sprites_quarter_turn_1_tile);
|
||||
session, 1, height, 0, direction, session.TrackColours[SCHEME_TRACK], mini_golf_track_sprites_quarter_turn_1_tile);
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D0, direction), 0xFFFF, 0);
|
||||
@@ -758,7 +756,7 @@ static void paint_mini_golf_track_left_quarter_turn_1_tile(
|
||||
if (!shouldDrawFence)
|
||||
break;
|
||||
|
||||
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_BACK_SW_NW | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_BACK_SW_NW | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 26, 24, 1, height, 6, 2, height);
|
||||
|
||||
break;
|
||||
@@ -767,7 +765,7 @@ static void paint_mini_golf_track_left_quarter_turn_1_tile(
|
||||
if (!shouldDrawFence)
|
||||
break;
|
||||
|
||||
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_BACK_NW_NE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_BACK_NW_NE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 26, 26, 1, height, 0, 0, height);
|
||||
break;
|
||||
|
||||
@@ -776,7 +774,7 @@ static void paint_mini_golf_track_left_quarter_turn_1_tile(
|
||||
if (!shouldDrawFence)
|
||||
break;
|
||||
|
||||
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_BACK_NE_SE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_BACK_NE_SE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 24, 26, 1, height, 2, 6, height);
|
||||
break;
|
||||
|
||||
@@ -786,7 +784,7 @@ static void paint_mini_golf_track_left_quarter_turn_1_tile(
|
||||
if (!shouldDrawFence)
|
||||
break;
|
||||
|
||||
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_BACK_SE_SW | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_BACK_SE_SW | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 24, 24, 1, height, 6, 6, height);
|
||||
break;
|
||||
}
|
||||
@@ -795,17 +793,17 @@ static void paint_mini_golf_track_left_quarter_turn_1_tile(
|
||||
{
|
||||
// TODO: The back fence uses the same x/y offsets, but uses another paint function. See if this occurs more often.
|
||||
track_paint_util_left_quarter_turn_1_tile_paint(
|
||||
session, 0, height, 24, direction, session->TrackColours[SCHEME_MISC],
|
||||
session, 0, height, 24, direction, session.TrackColours[SCHEME_MISC],
|
||||
mini_golf_track_sprites_quarter_turn_1_tile_fence_front);
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_INSIDE_SW_NW | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_INSIDE_SW_NW | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 5, 5, 5 }, { 24, 0, height + 2 });
|
||||
break;
|
||||
case 2:
|
||||
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_INSIDE_NE_SE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_INSIDE_NE_SE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 5, 5, 5 }, { 0, 24, height + 2 });
|
||||
break;
|
||||
}
|
||||
@@ -816,20 +814,20 @@ static void paint_mini_golf_track_left_quarter_turn_1_tile(
|
||||
|
||||
/** rct2: 0x0087F1BC */
|
||||
static void paint_mini_golf_track_right_quarter_turn_1_tile(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_mini_golf_track_left_quarter_turn_1_tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement);
|
||||
}
|
||||
|
||||
static void paint_mini_golf_hole_ab(
|
||||
paint_session* session, uint8_t trackSequence, uint8_t direction, int32_t height, const uint32_t sprites[4][2][2])
|
||||
paint_session& session, uint8_t trackSequence, uint8_t direction, int32_t height, const uint32_t sprites[4][2][2])
|
||||
{
|
||||
uint32_t imageId;
|
||||
CoordsXY boundBox, boundBoxOffset;
|
||||
|
||||
bool drewSupports = wooden_a_supports_paint_setup(
|
||||
session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
@@ -854,23 +852,23 @@ static void paint_mini_golf_hole_ab(
|
||||
boundBoxOffset = { 0, 3 };
|
||||
}
|
||||
|
||||
imageId = sprites[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = sprites[direction][trackSequence][1] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(
|
||||
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 0 }, { boundBoxOffset.x, boundBoxOffset.y, height + 24 });
|
||||
|
||||
if (drewSupports)
|
||||
{
|
||||
imageId = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(
|
||||
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
|
||||
|
||||
imageId = sprites[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = sprites[direction][trackSequence][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChild(
|
||||
session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = sprites[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = sprites[direction][trackSequence][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(
|
||||
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
|
||||
}
|
||||
@@ -878,7 +876,7 @@ static void paint_mini_golf_hole_ab(
|
||||
|
||||
/** rct2: 0x0087F1CC */
|
||||
static void paint_mini_golf_hole_a(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_mini_golf_hole_ab(session, trackSequence, direction, height, mini_golf_track_sprites_hole_a);
|
||||
@@ -886,7 +884,7 @@ static void paint_mini_golf_hole_a(
|
||||
|
||||
/** rct2: 0x0087F1DC */
|
||||
static void paint_mini_golf_hole_b(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_mini_golf_hole_ab(session, trackSequence, direction, height, mini_golf_track_sprites_hole_b);
|
||||
@@ -894,14 +892,14 @@ static void paint_mini_golf_hole_b(
|
||||
|
||||
/** rct2: 0x0087F1EC */
|
||||
static void paint_mini_golf_hole_c(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
CoordsXY boundBox, boundBoxOffset;
|
||||
|
||||
bool drewSupports = wooden_a_supports_paint_setup(
|
||||
session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
@@ -926,7 +924,7 @@ static void paint_mini_golf_hole_c(
|
||||
boundBoxOffset = { 0, 3 };
|
||||
}
|
||||
|
||||
imageId = mini_golf_track_sprites_hole_c[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = mini_golf_track_sprites_hole_c[direction][trackSequence][1] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
switch ((direction << 4) | trackSequence)
|
||||
{
|
||||
@@ -947,17 +945,17 @@ static void paint_mini_golf_hole_c(
|
||||
|
||||
if (drewSupports)
|
||||
{
|
||||
imageId = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(
|
||||
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
|
||||
|
||||
imageId = mini_golf_track_sprites_hole_c[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = mini_golf_track_sprites_hole_c[direction][trackSequence][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChild(
|
||||
session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = mini_golf_track_sprites_hole_c[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = mini_golf_track_sprites_hole_c[direction][trackSequence][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(
|
||||
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
|
||||
}
|
||||
@@ -965,7 +963,7 @@ static void paint_mini_golf_hole_c(
|
||||
|
||||
/** rct2: 0x0087F1FC */
|
||||
static void paint_mini_golf_hole_d(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
@@ -974,7 +972,7 @@ static void paint_mini_golf_hole_d(
|
||||
int32_t supportType = (direction & 1);
|
||||
if (trackSequence == 2)
|
||||
supportType = 1 - supportType;
|
||||
bool drewSupports = wooden_a_supports_paint_setup(session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
bool drewSupports = wooden_a_supports_paint_setup(session, supportType, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
@@ -1003,7 +1001,7 @@ static void paint_mini_golf_hole_d(
|
||||
boundBoxOffset = { 0, 3 };
|
||||
}
|
||||
|
||||
imageId = mini_golf_track_sprites_hole_d[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = mini_golf_track_sprites_hole_d[direction][trackSequence][1] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
switch ((direction << 4) | trackSequence)
|
||||
{
|
||||
@@ -1040,17 +1038,17 @@ static void paint_mini_golf_hole_d(
|
||||
|
||||
if (drewSupports)
|
||||
{
|
||||
imageId = ((supportType & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = ((supportType & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(
|
||||
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
|
||||
|
||||
imageId = mini_golf_track_sprites_hole_d[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = mini_golf_track_sprites_hole_d[direction][trackSequence][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChild(
|
||||
session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = mini_golf_track_sprites_hole_d[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = mini_golf_track_sprites_hole_d[direction][trackSequence][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(
|
||||
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
|
||||
}
|
||||
@@ -1058,7 +1056,7 @@ static void paint_mini_golf_hole_d(
|
||||
|
||||
/** rct2: 0x0087F1FC */
|
||||
static void paint_mini_golf_hole_e(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
@@ -1067,7 +1065,7 @@ static void paint_mini_golf_hole_e(
|
||||
int32_t supportType = (direction & 1);
|
||||
if (trackSequence == 2)
|
||||
supportType = 1 - supportType;
|
||||
bool drewSupports = wooden_a_supports_paint_setup(session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
bool drewSupports = wooden_a_supports_paint_setup(session, supportType, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
@@ -1096,7 +1094,7 @@ static void paint_mini_golf_hole_e(
|
||||
boundBoxOffset = { 0, 3 };
|
||||
}
|
||||
|
||||
imageId = mini_golf_track_sprites_hole_e[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = mini_golf_track_sprites_hole_e[direction][trackSequence][1] | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
switch ((direction << 4) | trackSequence)
|
||||
{
|
||||
@@ -1133,17 +1131,17 @@ static void paint_mini_golf_hole_e(
|
||||
|
||||
if (drewSupports)
|
||||
{
|
||||
imageId = ((supportType & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_SUPPORTS];
|
||||
imageId = ((supportType & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(
|
||||
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
|
||||
|
||||
imageId = mini_golf_track_sprites_hole_e[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = mini_golf_track_sprites_hole_e[direction][trackSequence][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChild(
|
||||
session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = mini_golf_track_sprites_hole_e[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = mini_golf_track_sprites_hole_e[direction][trackSequence][0] | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(
|
||||
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
|
||||
}
|
||||
@@ -1202,20 +1200,20 @@ TRACK_PAINT_FUNCTION get_track_paint_function_mini_golf(int32_t trackType)
|
||||
* rct2: 0x006D42F0
|
||||
*/
|
||||
void vehicle_visual_mini_golf_player(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle)
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle)
|
||||
{
|
||||
if (vehicle->num_peeps == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
rct_drawpixelinfo* edi = &session->DPI;
|
||||
rct_drawpixelinfo* edi = &session.DPI;
|
||||
if (edi->zoom_level >= ZoomLevel{ 2 })
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_INVISIBLE_PEEPS)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_INVISIBLE_PEEPS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1244,20 +1242,20 @@ void vehicle_visual_mini_golf_player(
|
||||
* rct2: 0x006D43C6
|
||||
*/
|
||||
void vehicle_visual_mini_golf_ball(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle)
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle)
|
||||
{
|
||||
if (vehicle->mini_golf_current_animation != MiniGolfAnimation::PlaceBallDown)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
rct_drawpixelinfo* edi = &session->DPI;
|
||||
rct_drawpixelinfo* edi = &session.DPI;
|
||||
if (edi->zoom_level >= ZoomLevel{ 1 })
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_INVISIBLE_PEEPS)
|
||||
if (session.ViewFlags & VIEWPORT_FLAG_INVISIBLE_PEEPS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -18,33 +18,33 @@
|
||||
|
||||
/** rct2: 0x */
|
||||
static void paint_mini_helicopters_track_station(
|
||||
paint_session* session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_STATION_BASE_B_SW_NE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 1 }, { 0, 2, height });
|
||||
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 32, 20, 1, height, 0, 0, height);
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
else if (direction == 1 || direction == 3)
|
||||
{
|
||||
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_STATION_BASE_B_NW_SE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 1 }, { 2, 0, height });
|
||||
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 20, 32, 1, height, 0, 0, height);
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
|
||||
@@ -56,29 +56,29 @@ static void paint_mini_helicopters_track_station(
|
||||
|
||||
/** rct2: 0x0081F348 */
|
||||
static void paint_mini_helicopters_track_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
|
||||
if (direction & 1)
|
||||
{
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height });
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_0);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_0);
|
||||
}
|
||||
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(
|
||||
session, (direction & 1) ? METAL_SUPPORTS_STICK_ALT : METAL_SUPPORTS_STICK, 4, -1, height,
|
||||
session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
paint_util_set_segment_support_height(
|
||||
@@ -88,7 +88,7 @@ static void paint_mini_helicopters_track_flat(
|
||||
|
||||
/** rct2: 0x0081F368 */
|
||||
static void paint_mini_helicopters_track_flat_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
@@ -96,30 +96,30 @@ static void paint_mini_helicopters_track_flat_to_25_deg_up(
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_SW_NE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_SW_NE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_0);
|
||||
break;
|
||||
case 1:
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_NW_SE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_NW_SE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height });
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_2);
|
||||
break;
|
||||
case 2:
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_NE_SW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_NE_SW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_2);
|
||||
break;
|
||||
case 3:
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_SE_NW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_SE_NW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height });
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_0);
|
||||
break;
|
||||
}
|
||||
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_STICK, 4, -4, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_STICK, 4, -4, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
paint_util_set_segment_support_height(
|
||||
@@ -129,7 +129,7 @@ static void paint_mini_helicopters_track_flat_to_25_deg_up(
|
||||
|
||||
/** rct2: 0x0081F358 */
|
||||
static void paint_mini_helicopters_track_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
@@ -137,30 +137,30 @@ static void paint_mini_helicopters_track_25_deg_up(
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_SW_NE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_SW_NE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
|
||||
paint_util_push_tunnel_left(session, height - 8, TUNNEL_1);
|
||||
break;
|
||||
case 1:
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_NW_SE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_NW_SE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height });
|
||||
paint_util_push_tunnel_right(session, height + 8, TUNNEL_2);
|
||||
break;
|
||||
case 2:
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_NE_SW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_NE_SW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
|
||||
paint_util_push_tunnel_left(session, height + 8, TUNNEL_2);
|
||||
break;
|
||||
case 3:
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_SE_NW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_SE_NW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height });
|
||||
paint_util_push_tunnel_right(session, height - 8, TUNNEL_1);
|
||||
break;
|
||||
}
|
||||
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_STICK, 4, -9, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_STICK, 4, -9, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
paint_util_set_segment_support_height(
|
||||
@@ -170,7 +170,7 @@ static void paint_mini_helicopters_track_25_deg_up(
|
||||
|
||||
/** rct2: 0x0081F378 */
|
||||
static void paint_mini_helicopters_track_25_deg_up_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
@@ -178,30 +178,30 @@ static void paint_mini_helicopters_track_25_deg_up_to_flat(
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_SW_NE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
|
||||
paint_util_push_tunnel_left(session, height - 8, TUNNEL_0);
|
||||
break;
|
||||
case 1:
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_NW_SE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height });
|
||||
paint_util_push_tunnel_right(session, height + 8, TUNNEL_12);
|
||||
break;
|
||||
case 2:
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_NE_SW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_NE_SW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
|
||||
paint_util_push_tunnel_left(session, height + 8, TUNNEL_12);
|
||||
break;
|
||||
case 3:
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_SE_NW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_SE_NW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height });
|
||||
paint_util_push_tunnel_right(session, height - 8, TUNNEL_0);
|
||||
break;
|
||||
}
|
||||
|
||||
if (track_paint_util_should_paint_supports(session->MapPosition))
|
||||
if (track_paint_util_should_paint_supports(session.MapPosition))
|
||||
{
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_STICK, 4, -7, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_STICK, 4, -7, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
paint_util_set_segment_support_height(
|
||||
@@ -211,7 +211,7 @@ static void paint_mini_helicopters_track_25_deg_up_to_flat(
|
||||
|
||||
/** rct2: 0x */
|
||||
static void paint_mini_helicopters_track_flat_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_mini_helicopters_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -219,7 +219,7 @@ static void paint_mini_helicopters_track_flat_to_25_deg_down(
|
||||
|
||||
/** rct2: 0x0081F388 */
|
||||
static void paint_mini_helicopters_track_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_mini_helicopters_track_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -227,7 +227,7 @@ static void paint_mini_helicopters_track_25_deg_down(
|
||||
|
||||
/** rct2: 0x0081F3A8 */
|
||||
static void paint_mini_helicopters_track_25_deg_down_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_mini_helicopters_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -235,18 +235,18 @@ static void paint_mini_helicopters_track_25_deg_down_to_flat(
|
||||
|
||||
/** rct2: 0x0081F3E8 */
|
||||
static void paint_mini_helicopters_track_left_quarter_turn_3_tiles(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
track_paint_util_left_quarter_turn_3_tiles_paint(
|
||||
session, 3, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK],
|
||||
session, 3, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK],
|
||||
trackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles);
|
||||
track_paint_util_left_quarter_turn_3_tiles_tunnel(session, height, TUNNEL_0, direction, trackSequence);
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
case 0:
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_STICK, 4, -1, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_STICK, 4, -1, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_B4, direction), 0xFFFF, 0);
|
||||
break;
|
||||
@@ -255,7 +255,7 @@ static void paint_mini_helicopters_track_left_quarter_turn_3_tiles(
|
||||
session, paint_util_rotate_segments(SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_B8, direction), 0xFFFF, 0);
|
||||
break;
|
||||
case 3:
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_STICK, 4, -1, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_STICK, 4, -1, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D4 | SEGMENT_C0, direction), 0xFFFF, 0);
|
||||
break;
|
||||
@@ -273,7 +273,7 @@ static constexpr const uint8_t mini_helicopters_right_quarter_turn_3_tiles_to_le
|
||||
|
||||
/** rct2: 0x0081F3F8 */
|
||||
static void paint_mini_helicopters_track_right_quarter_turn_3_tiles(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = mini_helicopters_right_quarter_turn_3_tiles_to_left_turn_map[trackSequence];
|
||||
@@ -283,11 +283,11 @@ static void paint_mini_helicopters_track_right_quarter_turn_3_tiles(
|
||||
|
||||
/** rct2: 0x0081F408 */
|
||||
static void paint_mini_helicopters_track_left_quarter_turn_1_tile(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
track_paint_util_left_quarter_turn_1_tile_paint(
|
||||
session, 1, height, 0, direction, session->TrackColours[SCHEME_TRACK],
|
||||
session, 1, height, 0, direction, session.TrackColours[SCHEME_TRACK],
|
||||
trackSpritesSubmarineRideMiniHelicoptersQuarterTurn1Tile);
|
||||
track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0);
|
||||
|
||||
@@ -298,7 +298,7 @@ static void paint_mini_helicopters_track_left_quarter_turn_1_tile(
|
||||
|
||||
/** rct2: 0x0081F418 */
|
||||
static void paint_mini_helicopters_track_right_quarter_turn_1_tile(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_mini_helicopters_track_left_quarter_turn_1_tile(
|
||||
|
||||
@@ -160,7 +160,7 @@ static constexpr const uint32_t monorail_cycles_track_pieces_flat_quarter_turn_3
|
||||
};
|
||||
|
||||
static paint_struct* paint_monorail_cycles_util_7c(
|
||||
paint_session* session, bool flip, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x,
|
||||
paint_session& session, bool flip, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x,
|
||||
int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x,
|
||||
int16_t bound_box_offset_y, int16_t bound_box_offset_z, uint32_t rotation)
|
||||
{
|
||||
@@ -178,12 +178,12 @@ static paint_struct* paint_monorail_cycles_util_7c(
|
||||
|
||||
/** rct2: 0x0088AD48 */
|
||||
static void paint_monorail_cycles_track_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId = monorail_cycles_track_pieces_flat[(direction & 1)] | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = monorail_cycles_track_pieces_flat[(direction & 1)] | session.TrackColours[SCHEME_TRACK];
|
||||
paint_monorail_cycles_util_7c(
|
||||
session, static_cast<bool>(direction & 1), imageId, 0, 0, 32, 20, 3, height, 0, 6, height, session->CurrentRotation);
|
||||
session, static_cast<bool>(direction & 1), imageId, 0, 0, 32, 20, 3, height, 0, 6, height, session.CurrentRotation);
|
||||
|
||||
if (direction & 1)
|
||||
{
|
||||
@@ -196,7 +196,7 @@ static void paint_monorail_cycles_track_flat(
|
||||
|
||||
metal_a_supports_paint_setup(
|
||||
session, (direction & 1) ? METAL_SUPPORTS_STICK_ALT : METAL_SUPPORTS_STICK, 4, -1, height,
|
||||
session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0);
|
||||
@@ -205,33 +205,33 @@ static void paint_monorail_cycles_track_flat(
|
||||
|
||||
/** rct2: 0x0088ADD8 */
|
||||
static void paint_monorail_cycles_station(
|
||||
paint_session* session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_STATION_BASE_B_SW_NE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 1 }, { 0, 2, height });
|
||||
|
||||
imageId = SPR_MONORAIL_CYCLES_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_MONORAIL_CYCLES_FLAT_SW_NE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 32, 20, 1, height, 0, 0, height);
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
else if (direction == 1 || direction == 3)
|
||||
{
|
||||
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_STATION_BASE_B_NW_SE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 1 }, { 2, 0, height });
|
||||
|
||||
imageId = SPR_MONORAIL_CYCLES_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_MONORAIL_CYCLES_FLAT_NW_SE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 20, 32, 1, height, 0, 0, height);
|
||||
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
|
||||
@@ -243,18 +243,18 @@ static void paint_monorail_cycles_station(
|
||||
|
||||
/** rct2: 0x0088AD88 */
|
||||
static void paint_monorail_cycles_track_left_quarter_turn_3_tiles(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
track_paint_util_left_quarter_turn_3_tiles_paint(
|
||||
session, 3, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK],
|
||||
session, 3, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK],
|
||||
monorail_cycles_track_pieces_flat_quarter_turn_3_tiles);
|
||||
track_paint_util_left_quarter_turn_3_tiles_tunnel(session, height, TUNNEL_0, direction, trackSequence);
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
case 0:
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_STICK, 4, -1, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_STICK, 4, -1, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_B4, direction), 0xFFFF, 0);
|
||||
break;
|
||||
@@ -263,7 +263,7 @@ static void paint_monorail_cycles_track_left_quarter_turn_3_tiles(
|
||||
session, paint_util_rotate_segments(SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_B8, direction), 0xFFFF, 0);
|
||||
break;
|
||||
case 3:
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_STICK, 4, -1, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(session, METAL_SUPPORTS_STICK, 4, -1, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_set_segment_support_height(
|
||||
session, paint_util_rotate_segments(SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D4 | SEGMENT_C0, direction), 0xFFFF, 0);
|
||||
break;
|
||||
@@ -281,7 +281,7 @@ static constexpr const uint8_t monorail_cycles_right_quarter_turn_3_tiles_to_lef
|
||||
|
||||
/** rct2: 0x0088AD98 */
|
||||
static void paint_monorail_cycles_track_right_quarter_turn_3_tiles(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = monorail_cycles_right_quarter_turn_3_tiles_to_left_turn_map[trackSequence];
|
||||
@@ -305,11 +305,11 @@ static constexpr const int8_t monorail_cycles_track_right_quarter_turn_5_tiles_s
|
||||
|
||||
/** rct2: 0x0088ADB8 */
|
||||
static void paint_monorail_cycles_track_right_quarter_turn_5_tiles(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
track_paint_util_right_quarter_turn_5_tiles_paint(
|
||||
session, 1, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK],
|
||||
session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK],
|
||||
monorail_cycles_track_pieces_flat_quarter_turn_5_tiles, nullptr, defaultRightQuarterTurn5TilesBoundLengths,
|
||||
defaultRightQuarterTurn5TilesBoundOffsets);
|
||||
|
||||
@@ -321,48 +321,48 @@ static void paint_monorail_cycles_track_right_quarter_turn_5_tiles(
|
||||
case 0:
|
||||
metal_a_supports_paint_setup(
|
||||
session, (direction & 1) ? METAL_SUPPORTS_STICK_ALT : METAL_SUPPORTS_STICK, 4, supportSpecial, supportHeight,
|
||||
session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 2:
|
||||
if (direction == 0)
|
||||
metal_a_supports_paint_setup(
|
||||
session, (direction & 1) ? METAL_SUPPORTS_STICK_ALT : METAL_SUPPORTS_STICK, 8, supportSpecial,
|
||||
supportHeight, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
supportHeight, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
if (direction == 1)
|
||||
metal_a_supports_paint_setup(
|
||||
session, (direction & 1) ? METAL_SUPPORTS_STICK_ALT : METAL_SUPPORTS_STICK, 7, supportSpecial,
|
||||
supportHeight, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
supportHeight, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
if (direction == 2)
|
||||
metal_a_supports_paint_setup(
|
||||
session, (direction & 1) ? METAL_SUPPORTS_STICK_ALT : METAL_SUPPORTS_STICK, 5, supportSpecial,
|
||||
supportHeight, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
supportHeight, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
if (direction == 3)
|
||||
metal_a_supports_paint_setup(
|
||||
session, (direction & 1) ? METAL_SUPPORTS_STICK_ALT : METAL_SUPPORTS_STICK, 6, supportSpecial,
|
||||
supportHeight, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
supportHeight, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 5:
|
||||
if (direction == 0)
|
||||
metal_a_supports_paint_setup(
|
||||
session, (direction & 1) ? METAL_SUPPORTS_STICK : METAL_SUPPORTS_STICK_ALT, 7, supportSpecial,
|
||||
supportHeight, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
supportHeight, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
if (direction == 1)
|
||||
metal_a_supports_paint_setup(
|
||||
session, (direction & 1) ? METAL_SUPPORTS_STICK : METAL_SUPPORTS_STICK_ALT, 5, supportSpecial,
|
||||
supportHeight, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
supportHeight, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
if (direction == 2)
|
||||
metal_a_supports_paint_setup(
|
||||
session, (direction & 1) ? METAL_SUPPORTS_STICK : METAL_SUPPORTS_STICK_ALT, 6, supportSpecial,
|
||||
supportHeight, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
supportHeight, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
if (direction == 3)
|
||||
metal_a_supports_paint_setup(
|
||||
session, (direction & 1) ? METAL_SUPPORTS_STICK : METAL_SUPPORTS_STICK_ALT, 8, supportSpecial,
|
||||
supportHeight, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
supportHeight, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 6:
|
||||
metal_a_supports_paint_setup(
|
||||
session, (direction & 1) ? METAL_SUPPORTS_STICK : METAL_SUPPORTS_STICK_ALT, 4, supportSpecial, supportHeight,
|
||||
session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ static void paint_monorail_cycles_track_right_quarter_turn_5_tiles(
|
||||
|
||||
/** rct2: 0x0088ADA8 */
|
||||
static void paint_monorail_cycles_track_left_quarter_turn_5_tiles(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence];
|
||||
@@ -431,7 +431,7 @@ static void paint_monorail_cycles_track_left_quarter_turn_5_tiles(
|
||||
|
||||
/** rct2: 0x0088ADC8 */
|
||||
static void paint_monorail_cycles_track_s_bend_left(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
if (direction == 2 || direction == 3)
|
||||
@@ -440,24 +440,24 @@ static void paint_monorail_cycles_track_s_bend_left(
|
||||
}
|
||||
|
||||
uint32_t imageId = monorail_cycles_track_pieces_s_bend_left[direction & 1][trackSequence]
|
||||
| session->TrackColours[SCHEME_TRACK];
|
||||
| session.TrackColours[SCHEME_TRACK];
|
||||
switch (trackSequence)
|
||||
{
|
||||
case 0:
|
||||
paint_monorail_cycles_util_7c(
|
||||
session, direction & 1, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session->CurrentRotation);
|
||||
session, direction & 1, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session.CurrentRotation);
|
||||
break;
|
||||
case 1:
|
||||
paint_monorail_cycles_util_7c(
|
||||
session, direction & 1, imageId, 0, 0, 32, 26, 1, height, 0, 0, height, session->CurrentRotation);
|
||||
session, direction & 1, imageId, 0, 0, 32, 26, 1, height, 0, 0, height, session.CurrentRotation);
|
||||
break;
|
||||
case 2:
|
||||
paint_monorail_cycles_util_7c(
|
||||
session, direction & 1, imageId, 0, 0, 32, 26, 1, height, 0, 6, height, session->CurrentRotation);
|
||||
session, direction & 1, imageId, 0, 0, 32, 26, 1, height, 0, 6, height, session.CurrentRotation);
|
||||
break;
|
||||
case 3:
|
||||
paint_monorail_cycles_util_7c(
|
||||
session, direction & 1, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session->CurrentRotation);
|
||||
session, direction & 1, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session.CurrentRotation);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -472,15 +472,15 @@ static void paint_monorail_cycles_track_s_bend_left(
|
||||
{
|
||||
case 0:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_STICK, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_STICK, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 1:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_STICK, 5, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_STICK, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 3:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_STICK, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_STICK, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -495,15 +495,15 @@ static void paint_monorail_cycles_track_s_bend_left(
|
||||
{
|
||||
case 0:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_STICK_ALT, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_STICK_ALT, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 1:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_STICK_ALT, 6, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_STICK_ALT, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 3:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_STICK_ALT, 4, 0, height - 2, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_STICK_ALT, 4, 0, height - 2, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -540,7 +540,7 @@ static void paint_monorail_cycles_track_s_bend_left(
|
||||
|
||||
/** rct2: 0x*/
|
||||
static void paint_monorail_cycles_track_s_bend_right(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
if (direction == 2 || direction == 3)
|
||||
@@ -549,24 +549,24 @@ static void paint_monorail_cycles_track_s_bend_right(
|
||||
}
|
||||
|
||||
uint32_t imageId = monorail_cycles_track_pieces_s_bend_right[direction & 1][trackSequence]
|
||||
| session->TrackColours[SCHEME_TRACK];
|
||||
| session.TrackColours[SCHEME_TRACK];
|
||||
switch (trackSequence)
|
||||
{
|
||||
case 0:
|
||||
paint_monorail_cycles_util_7c(
|
||||
session, direction & 1, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session->CurrentRotation);
|
||||
session, direction & 1, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session.CurrentRotation);
|
||||
break;
|
||||
case 1:
|
||||
paint_monorail_cycles_util_7c(
|
||||
session, direction & 1, imageId, 0, 0, 32, 26, 1, height, 0, 6, height, session->CurrentRotation);
|
||||
session, direction & 1, imageId, 0, 0, 32, 26, 1, height, 0, 6, height, session.CurrentRotation);
|
||||
break;
|
||||
case 2:
|
||||
paint_monorail_cycles_util_7c(
|
||||
session, direction & 1, imageId, 0, 0, 32, 26, 1, height, 0, 0, height, session->CurrentRotation);
|
||||
session, direction & 1, imageId, 0, 0, 32, 26, 1, height, 0, 0, height, session.CurrentRotation);
|
||||
break;
|
||||
case 3:
|
||||
paint_monorail_cycles_util_7c(
|
||||
session, direction & 1, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session->CurrentRotation);
|
||||
session, direction & 1, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session.CurrentRotation);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -581,15 +581,15 @@ static void paint_monorail_cycles_track_s_bend_right(
|
||||
{
|
||||
case 0:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_STICK, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_STICK, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 1:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_STICK, 8, 0, height - 2, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_STICK, 8, 0, height - 2, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 3:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_STICK, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_STICK, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -604,15 +604,15 @@ static void paint_monorail_cycles_track_s_bend_right(
|
||||
{
|
||||
case 0:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_STICK_ALT, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_STICK_ALT, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 1:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_STICK_ALT, 7, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_STICK_ALT, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
case 3:
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_STICK_ALT, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_STICK_ALT, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ static uint32_t GetObservationTowerVehicleBaseImageId(
|
||||
* rct2: 0x006D6258
|
||||
*/
|
||||
void vehicle_visual_observation_tower(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
auto baseImageId = GetObservationTowerVehicleBaseImageId(vehicle, vehicleEntry, imageDirection);
|
||||
@@ -83,34 +83,34 @@ void vehicle_visual_observation_tower(
|
||||
|
||||
/** rct2: 0x0070DD6C */
|
||||
static void paint_observation_tower_base(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = track_map_3x3[direction][trackSequence];
|
||||
|
||||
int32_t edges = edges_3x3[trackSequence];
|
||||
CoordsXY position = session->MapPosition;
|
||||
CoordsXY position = session.MapPosition;
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
|
||||
track_paint_util_paint_floor(
|
||||
session, edges, session->TrackColours[SCHEME_SUPPORTS], height, floorSpritesMetalB, stationObject);
|
||||
session, edges, session.TrackColours[SCHEME_SUPPORTS], height, floorSpritesMetalB, stationObject);
|
||||
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, position, trackElement, ride, session->TrackColours[SCHEME_TRACK], height, fenceSpritesMetalB,
|
||||
session->CurrentRotation);
|
||||
session, edges, position, trackElement, ride, session.TrackColours[SCHEME_TRACK], height, fenceSpritesMetalB,
|
||||
session.CurrentRotation);
|
||||
|
||||
if (trackSequence == 0)
|
||||
{
|
||||
uint32_t imageId = SPR_OBSERVATION_TOWER_SEGMENT_BASE | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = SPR_OBSERVATION_TOWER_SEGMENT_BASE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 8, 8, height + 3 });
|
||||
|
||||
imageId = SPR_OBSERVATION_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_OBSERVATION_TOWER_SEGMENT | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height + 32 }, { 2, 2, 30 }, { 8, 8, height + 32 });
|
||||
|
||||
imageId = SPR_OBSERVATION_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_OBSERVATION_TOWER_SEGMENT | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height + 64 }, { 2, 2, 30 }, { 8, 8, height + 64 });
|
||||
|
||||
paint_util_set_vertical_tunnel(session, height + 96);
|
||||
@@ -159,7 +159,7 @@ static void paint_observation_tower_base(
|
||||
|
||||
/** rct2: 0x0070DD7C */
|
||||
static void paint_observation_tower_section(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
if (trackSequence == 1)
|
||||
@@ -167,13 +167,13 @@ static void paint_observation_tower_section(
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t imageId = SPR_OBSERVATION_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = SPR_OBSERVATION_TOWER_SEGMENT | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 8, 8, height });
|
||||
|
||||
const TileElement* nextTileElement = reinterpret_cast<const TileElement*>(&trackElement) + 1;
|
||||
if (trackElement.IsLastForTile() || trackElement.GetClearanceZ() != nextTileElement->GetBaseZ())
|
||||
{
|
||||
imageId = SPR_OBSERVATION_TOWER_SEGMENT_TOP | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_OBSERVATION_TOWER_SEGMENT_TOP | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@ static constexpr const uint32_t space_rings_fence_sprites[] = {
|
||||
|
||||
/** rct2: 0x00768A3B */
|
||||
static void paint_space_rings_structure(
|
||||
paint_session* session, const Ride& ride, uint8_t direction, uint32_t segment, int32_t height)
|
||||
paint_session& session, const Ride& ride, uint8_t direction, uint32_t segment, int32_t height)
|
||||
{
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session->CurrentlyDrawnItem);
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session.CurrentlyDrawnItem);
|
||||
|
||||
uint32_t vehicleIndex = (segment - direction) & 0x3;
|
||||
|
||||
@@ -50,12 +50,12 @@ static void paint_space_rings_structure(
|
||||
auto vehicle = GetEntity<Vehicle>(ride.vehicles[vehicleIndex]);
|
||||
if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr)
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::Entity;
|
||||
session->CurrentlyDrawnItem = vehicle;
|
||||
session.InteractionType = ViewportInteractionItem::Entity;
|
||||
session.CurrentlyDrawnItem = vehicle;
|
||||
frameNum += static_cast<int8_t>(vehicle->Pitch) * 4;
|
||||
}
|
||||
|
||||
uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC];
|
||||
uint32_t imageColourFlags = session.TrackColours[SCHEME_MISC];
|
||||
if ((ride.colour_scheme_type & 3) != RIDE_COLOUR_SCHEME_DIFFERENT_PER_TRAIN)
|
||||
{
|
||||
vehicleIndex = 0;
|
||||
@@ -82,45 +82,45 @@ static void paint_space_rings_structure(
|
||||
}
|
||||
}
|
||||
|
||||
session->CurrentlyDrawnItem = savedTileElement;
|
||||
session->InteractionType = ViewportInteractionItem::Ride;
|
||||
session.CurrentlyDrawnItem = savedTileElement;
|
||||
session.InteractionType = ViewportInteractionItem::Ride;
|
||||
}
|
||||
|
||||
/** rct2: 0x00767C40 */
|
||||
static void paint_space_rings(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = track_map_3x3[direction][trackSequence];
|
||||
|
||||
int32_t edges = edges_3x3[trackSequence];
|
||||
CoordsXY position = session->MapPosition;
|
||||
CoordsXY position = session.MapPosition;
|
||||
|
||||
uint32_t imageId;
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
track_paint_util_paint_floor(session, edges, session->TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
case 7:
|
||||
if (track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session->CurrentRotation))
|
||||
if (track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session.CurrentRotation))
|
||||
{
|
||||
imageId = SPR_SPACE_RINGS_FENCE_SW | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_SPACE_RINGS_FENCE_SW | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 28, 7 }, { 29, 0, height + 2 });
|
||||
}
|
||||
if (track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, session->CurrentRotation))
|
||||
if (track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, session.CurrentRotation))
|
||||
{
|
||||
imageId = SPR_SPACE_RINGS_FENCE_SE | session->TrackColours[SCHEME_MISC];
|
||||
imageId = SPR_SPACE_RINGS_FENCE_SE | session.TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 1, 7 }, { 0, 29, height + 2 });
|
||||
}
|
||||
break;
|
||||
default:
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, position, trackElement, ride, session->TrackColours[SCHEME_MISC], height,
|
||||
space_rings_fence_sprites, session->CurrentRotation);
|
||||
session, edges, position, trackElement, ride, session.TrackColours[SCHEME_MISC], height,
|
||||
space_rings_fence_sprites, session.CurrentRotation);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,80 +48,80 @@ enum
|
||||
};
|
||||
|
||||
static void spiral_slide_paint_tile_right(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t image_id = 0;
|
||||
|
||||
if (direction == 0)
|
||||
image_id = SPIRAL_SLIDE_RIGHT_R0 | session->TrackColours[SCHEME_TRACK];
|
||||
image_id = SPIRAL_SLIDE_RIGHT_R0 | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 1)
|
||||
image_id = SPIRAL_SLIDE_RIGHT_R1 | session->TrackColours[SCHEME_TRACK];
|
||||
image_id = SPIRAL_SLIDE_RIGHT_R1 | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 2)
|
||||
image_id = SPIRAL_SLIDE_RIGHT_R2 | session->TrackColours[SCHEME_TRACK];
|
||||
image_id = SPIRAL_SLIDE_RIGHT_R2 | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 3)
|
||||
image_id = SPIRAL_SLIDE_RIGHT_R3 | session->TrackColours[SCHEME_TRACK];
|
||||
image_id = SPIRAL_SLIDE_RIGHT_R3 | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 16, 16, 108 }, { 16, 0, height + 3 });
|
||||
}
|
||||
|
||||
static void spiral_slide_paint_tile_left(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t image_id = 0;
|
||||
|
||||
if (direction == 0)
|
||||
image_id = SPIRAL_SLIDE_LEFT_R0 | session->TrackColours[SCHEME_TRACK];
|
||||
image_id = SPIRAL_SLIDE_LEFT_R0 | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 1)
|
||||
image_id = SPIRAL_SLIDE_LEFT_R1 | session->TrackColours[SCHEME_TRACK];
|
||||
image_id = SPIRAL_SLIDE_LEFT_R1 | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 2)
|
||||
image_id = SPIRAL_SLIDE_LEFT_R2 | session->TrackColours[SCHEME_TRACK];
|
||||
image_id = SPIRAL_SLIDE_LEFT_R2 | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 3)
|
||||
image_id = SPIRAL_SLIDE_LEFT_R3 | session->TrackColours[SCHEME_TRACK];
|
||||
image_id = SPIRAL_SLIDE_LEFT_R3 | session.TrackColours[SCHEME_TRACK];
|
||||
|
||||
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 16, 16, 108 }, { 0, 16, height + 3 });
|
||||
}
|
||||
|
||||
static void spiral_slide_paint_tile_front(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t image_id = 0;
|
||||
|
||||
if (direction == 1)
|
||||
{
|
||||
image_id = SPIRAL_SLIDE_INSIDE_R1 | session->TrackColours[SCHEME_TRACK];
|
||||
image_id = SPIRAL_SLIDE_INSIDE_R1 | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 2, 16, 108 }, { -12, 0, height + 3 });
|
||||
}
|
||||
else if (direction == 2)
|
||||
{
|
||||
image_id = SPIRAL_SLIDE_INSIDE_R2 | session->TrackColours[SCHEME_TRACK];
|
||||
image_id = SPIRAL_SLIDE_INSIDE_R2 | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 16, 2, 108 }, { 0, -12, height + 3 });
|
||||
}
|
||||
|
||||
if (direction == 0)
|
||||
{
|
||||
image_id = SPIRAL_SLIDE_CENTRE_R0 | session->TrackColours[SCHEME_TRACK];
|
||||
image_id = SPIRAL_SLIDE_CENTRE_R0 | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 16, 8, 108 }, { 0, 8, height + 3 });
|
||||
}
|
||||
else if (direction == 1)
|
||||
{
|
||||
image_id = SPIRAL_SLIDE_CENTRE_R1 | session->TrackColours[SCHEME_TRACK];
|
||||
image_id = SPIRAL_SLIDE_CENTRE_R1 | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 2, 16, 108 }, { 14, 0, height + 3 });
|
||||
}
|
||||
else if (direction == 2)
|
||||
{
|
||||
image_id = SPIRAL_SLIDE_CENTRE_R2 | session->TrackColours[SCHEME_TRACK];
|
||||
image_id = SPIRAL_SLIDE_CENTRE_R2 | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 16, 2, 108 }, { 0, 14, height + 3 });
|
||||
}
|
||||
else if (direction == 3)
|
||||
{
|
||||
image_id = SPIRAL_SLIDE_CENTRE_R3 | session->TrackColours[SCHEME_TRACK];
|
||||
image_id = SPIRAL_SLIDE_CENTRE_R3 | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 8, 16, 108 }, { 8, 0, height + 3 });
|
||||
}
|
||||
|
||||
rct_drawpixelinfo* dpi = &session->DPI;
|
||||
rct_drawpixelinfo* dpi = &session.DPI;
|
||||
if (dpi->zoom_level <= ZoomLevel{ 0 } && ride.slide_in_use != 0)
|
||||
{
|
||||
uint8_t slide_progress = ride.spiral_slide_progress;
|
||||
@@ -190,14 +190,14 @@ static constexpr const uint32_t spiral_slide_fence_sprites[] = {
|
||||
* rct: 0x007485C8
|
||||
*/
|
||||
static void paint_spiral_slide(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = track_map_2x2[direction][trackSequence];
|
||||
|
||||
int32_t edges = edges_2x2[trackSequence];
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
// Base
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
@@ -205,13 +205,13 @@ static void paint_spiral_slide(
|
||||
if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
|
||||
{
|
||||
uint32_t imageId = ((direction & 1) ? SPIRAL_SLIDE_BASE_B : SPIRAL_SLIDE_BASE_A)
|
||||
| session->TrackColours[SCHEME_SUPPORTS];
|
||||
| session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height });
|
||||
}
|
||||
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_TRACK], height,
|
||||
spiral_slide_fence_sprites, session->CurrentRotation);
|
||||
session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_TRACK], height,
|
||||
spiral_slide_fence_sprites, session.CurrentRotation);
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
#include "../TrackPaint.h"
|
||||
|
||||
static void PaintFacility(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
bool hasSupports = wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_3]);
|
||||
bool hasSupports = wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_3]);
|
||||
|
||||
auto rideEntry = ride.GetRideEntry();
|
||||
if (rideEntry == nullptr)
|
||||
@@ -37,12 +37,12 @@ static void PaintFacility(
|
||||
CoordsXYZ bbLength(lengthX, lengthY, 29);
|
||||
CoordsXYZ bbOffset(direction == 3 ? 28 : 2, direction == 0 ? 28 : 2, height);
|
||||
|
||||
auto imageTemplate = ImageId::FromUInt32(session->TrackColours[SCHEME_TRACK]);
|
||||
auto imageTemplate = ImageId::FromUInt32(session.TrackColours[SCHEME_TRACK]);
|
||||
auto imageIndex = firstVehicleEntry->base_image_id + ((direction + 2) & 3);
|
||||
auto imageId = imageTemplate.WithIndex(imageIndex);
|
||||
if (hasSupports)
|
||||
{
|
||||
auto foundationImageTemplate = ImageId::FromUInt32(session->TrackColours[SCHEME_3]);
|
||||
auto foundationImageTemplate = ImageId::FromUInt32(session.TrackColours[SCHEME_3]);
|
||||
auto foundationImageIndex = (direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS;
|
||||
auto foundationImageId = foundationImageTemplate.WithIndex(foundationImageIndex);
|
||||
PaintAddImageAsParent(session, foundationImageId, offset, bbLength, bbOffset);
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
#include "../TrackPaint.h"
|
||||
|
||||
static void PaintShop(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
bool hasSupports = wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_3]);
|
||||
bool hasSupports = wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_3]);
|
||||
|
||||
auto rideEntry = ride.GetRideEntry();
|
||||
if (rideEntry == nullptr)
|
||||
@@ -35,7 +35,7 @@ static void PaintShop(
|
||||
CoordsXYZ bbLength(28, 28, 45);
|
||||
CoordsXYZ bbOffset(2, 2, height);
|
||||
|
||||
auto imageFlags = session->TrackColours[SCHEME_TRACK];
|
||||
auto imageFlags = session.TrackColours[SCHEME_TRACK];
|
||||
if (imageFlags & IMAGE_TYPE_REMAP_2_PLUS)
|
||||
{
|
||||
imageFlags &= ~IMAGE_TYPE_REMAP_2_PLUS;
|
||||
@@ -45,7 +45,7 @@ static void PaintShop(
|
||||
auto imageIndex = firstVehicleEntry->base_image_id + direction;
|
||||
if (hasSupports)
|
||||
{
|
||||
auto foundationImageTemplate = ImageId::FromUInt32(session->TrackColours[SCHEME_3]);
|
||||
auto foundationImageTemplate = ImageId::FromUInt32(session.TrackColours[SCHEME_3]);
|
||||
auto foundationImageIndex = (direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS;
|
||||
auto foundationImageId = foundationImageTemplate.WithIndex(foundationImageIndex);
|
||||
PaintAddImageAsParent(session, foundationImageId, offset, bbLength, bbOffset);
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
#include "../TrackPaint.h"
|
||||
|
||||
static void Paint3dCinemaDome(
|
||||
paint_session* session, const Ride& ride, uint8_t direction, int8_t xOffset, int8_t yOffset, uint16_t height)
|
||||
paint_session& session, const Ride& ride, uint8_t direction, int8_t xOffset, int8_t yOffset, uint16_t height)
|
||||
{
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session->CurrentlyDrawnItem);
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session.CurrentlyDrawnItem);
|
||||
|
||||
auto rideEntry = ride.GetRideEntry();
|
||||
if (rideEntry == nullptr)
|
||||
@@ -27,12 +27,12 @@ static void Paint3dCinemaDome(
|
||||
|
||||
if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride.vehicles[0] != SPRITE_INDEX_NULL)
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::Entity;
|
||||
session->CurrentlyDrawnItem = GetEntity<Vehicle>(ride.vehicles[0]);
|
||||
session.InteractionType = ViewportInteractionItem::Entity;
|
||||
session.CurrentlyDrawnItem = GetEntity<Vehicle>(ride.vehicles[0]);
|
||||
}
|
||||
|
||||
auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim);
|
||||
auto imageFlags = session->TrackColours[SCHEME_MISC];
|
||||
auto imageFlags = session.TrackColours[SCHEME_MISC];
|
||||
if (imageFlags != IMAGE_TYPE_REMAP)
|
||||
{
|
||||
imageTemplate = ImageId::FromUInt32(imageFlags);
|
||||
@@ -42,30 +42,30 @@ static void Paint3dCinemaDome(
|
||||
PaintAddImageAsParent(
|
||||
session, imageId, { xOffset, yOffset, height + 3 }, { 24, 24, 47 }, { xOffset + 16, yOffset + 16, height + 3 });
|
||||
|
||||
session->CurrentlyDrawnItem = savedTileElement;
|
||||
session->InteractionType = ViewportInteractionItem::Ride;
|
||||
session.CurrentlyDrawnItem = savedTileElement;
|
||||
session.InteractionType = ViewportInteractionItem::Ride;
|
||||
}
|
||||
|
||||
/**
|
||||
* rct2: 0x0076574C
|
||||
*/
|
||||
static void Paint3dCinema(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = track_map_3x3[direction][trackSequence];
|
||||
|
||||
int32_t edges = edges_3x3[trackSequence];
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
|
||||
track_paint_util_paint_floor(session, edges, session->TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_MISC], height, fenceSpritesRope,
|
||||
session->CurrentRotation);
|
||||
session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_MISC], height, fenceSpritesRope,
|
||||
session.CurrentRotation);
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
#include "../Vehicle.h"
|
||||
|
||||
static void PaintEnterpriseRiders(
|
||||
paint_session* session, const rct_ride_entry& rideEntry, Vehicle& vehicle, uint32_t imageOffset, const CoordsXYZ& offset,
|
||||
paint_session& session, const rct_ride_entry& rideEntry, Vehicle& vehicle, uint32_t imageOffset, const CoordsXYZ& offset,
|
||||
const CoordsXYZ& bbLength, const CoordsXYZ& bbOffset)
|
||||
{
|
||||
if (session->DPI.zoom_level > ZoomLevel{ 0 })
|
||||
if (session.DPI.zoom_level > ZoomLevel{ 0 })
|
||||
return;
|
||||
if (imageOffset >= 12)
|
||||
return;
|
||||
@@ -42,9 +42,9 @@ static void PaintEnterpriseRiders(
|
||||
}
|
||||
|
||||
static void PaintEnterpriseStructure(
|
||||
paint_session* session, const Ride& ride, int8_t xOffset, int8_t yOffset, uint16_t height, const TrackElement& trackElement)
|
||||
paint_session& session, const Ride& ride, int8_t xOffset, int8_t yOffset, uint16_t height, const TrackElement& trackElement)
|
||||
{
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session->CurrentlyDrawnItem);
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session.CurrentlyDrawnItem);
|
||||
const auto* rideEntry = get_ride_entry(ride.subtype);
|
||||
if (rideEntry == nullptr)
|
||||
return;
|
||||
@@ -55,8 +55,8 @@ static void PaintEnterpriseStructure(
|
||||
vehicle = GetEntity<Vehicle>(ride.vehicles[0]);
|
||||
if (vehicle != nullptr)
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::Entity;
|
||||
session->CurrentlyDrawnItem = vehicle;
|
||||
session.InteractionType = ViewportInteractionItem::Entity;
|
||||
session.CurrentlyDrawnItem = vehicle;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,14 +64,14 @@ static void PaintEnterpriseStructure(
|
||||
CoordsXYZ bbLength(24, 24, 48);
|
||||
CoordsXYZ bbOffset(0, 0, height + 7);
|
||||
|
||||
uint32_t imageOffset = trackElement.GetDirectionWithOffset(session->CurrentRotation);
|
||||
uint32_t imageOffset = trackElement.GetDirectionWithOffset(session.CurrentRotation);
|
||||
if (vehicle != nullptr)
|
||||
{
|
||||
imageOffset = (vehicle->Pitch << 2) + (((vehicle->sprite_direction >> 3) + session->CurrentRotation) % 4);
|
||||
imageOffset = (vehicle->Pitch << 2) + (((vehicle->sprite_direction >> 3) + session.CurrentRotation) % 4);
|
||||
}
|
||||
|
||||
auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim);
|
||||
auto imageFlags = session->TrackColours[SCHEME_MISC];
|
||||
auto imageFlags = session.TrackColours[SCHEME_MISC];
|
||||
if (imageFlags != IMAGE_TYPE_REMAP)
|
||||
{
|
||||
imageTemplate = ImageId::FromUInt32(imageFlags);
|
||||
@@ -84,26 +84,26 @@ static void PaintEnterpriseStructure(
|
||||
PaintEnterpriseRiders(session, *rideEntry, *vehicle, imageOffset, offset, bbLength, bbOffset);
|
||||
}
|
||||
|
||||
session->CurrentlyDrawnItem = savedTileElement;
|
||||
session->InteractionType = ViewportInteractionItem::Ride;
|
||||
session.CurrentlyDrawnItem = savedTileElement;
|
||||
session.InteractionType = ViewportInteractionItem::Ride;
|
||||
}
|
||||
|
||||
static void PaintEnterprise(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = track_map_4x4[direction][trackSequence];
|
||||
|
||||
int32_t edges = edges_4x4[trackSequence];
|
||||
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
track_paint_util_paint_floor(session, edges, session->TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_TRACK], height, fenceSpritesRope,
|
||||
session->CurrentRotation);
|
||||
session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_TRACK], height, fenceSpritesRope,
|
||||
session.CurrentRotation);
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
|
||||
@@ -126,32 +126,32 @@ static constexpr const uint32_t go_karts_track_pieces_25_deg_up_to_flat[4][2] =
|
||||
|
||||
/** rct2: 0x0074A748 */
|
||||
static void paint_go_karts_track_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
imageId = SPR_GO_KARTS_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_SW_NE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 28, 1 }, { 0, 2, height });
|
||||
|
||||
imageId = SPR_GO_KARTS_FLAT_FRONT_SW_NE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_FRONT_SW_NE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 3 }, { 0, 29, height + 2 });
|
||||
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageId = SPR_GO_KARTS_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_NW_SE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 32, 1 }, { 2, 0, height });
|
||||
|
||||
imageId = SPR_GO_KARTS_FLAT_FRONT_NW_SE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_FRONT_NW_SE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 3 }, { 29, 0, height + 2 });
|
||||
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
@@ -159,13 +159,13 @@ static void paint_go_karts_track_flat(
|
||||
|
||||
/** rct2: 0x0074A758 */
|
||||
static void paint_go_karts_track_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
paint_struct* ps;
|
||||
|
||||
imageId = go_karts_track_pieces_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = go_karts_track_pieces_25_deg_up[direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 28, 1 }, { 0, 2, height });
|
||||
@@ -175,7 +175,7 @@ static void paint_go_karts_track_25_deg_up(
|
||||
ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 32, 1 }, { 2, 0, height });
|
||||
}
|
||||
|
||||
imageId = go_karts_track_pieces_25_deg_up[direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = go_karts_track_pieces_25_deg_up[direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 11 }, { 0, 29, height + 2 });
|
||||
@@ -185,24 +185,24 @@ static void paint_go_karts_track_25_deg_up(
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 11 }, { 29, 0, height + 2 });
|
||||
}
|
||||
|
||||
session->WoodenSupportsPrependTo = ps;
|
||||
session.WoodenSupportsPrependTo = ps;
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
wooden_a_supports_paint_setup(session, 0, 9, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height - 8, TUNNEL_SQUARE_7);
|
||||
break;
|
||||
case 1:
|
||||
wooden_a_supports_paint_setup(session, 1, 10, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height + 8, TUNNEL_SQUARE_8);
|
||||
break;
|
||||
case 2:
|
||||
wooden_a_supports_paint_setup(session, 0, 11, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height + 8, TUNNEL_SQUARE_8);
|
||||
break;
|
||||
case 3:
|
||||
wooden_a_supports_paint_setup(session, 1, 12, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height - 8, TUNNEL_SQUARE_7);
|
||||
break;
|
||||
}
|
||||
@@ -213,13 +213,13 @@ static void paint_go_karts_track_25_deg_up(
|
||||
|
||||
/** rct2: 0x0074A768 */
|
||||
static void paint_go_karts_track_flat_to_25_deg_up(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
paint_struct* ps;
|
||||
|
||||
imageId = go_karts_track_pieces_flat_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = go_karts_track_pieces_flat_to_25_deg_up[direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 28, 1 }, { 0, 2, height });
|
||||
@@ -229,7 +229,7 @@ static void paint_go_karts_track_flat_to_25_deg_up(
|
||||
ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 32, 1 }, { 2, 0, height });
|
||||
}
|
||||
|
||||
imageId = go_karts_track_pieces_flat_to_25_deg_up[direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = go_karts_track_pieces_flat_to_25_deg_up[direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 11 }, { 0, 29, height + 2 });
|
||||
@@ -239,24 +239,24 @@ static void paint_go_karts_track_flat_to_25_deg_up(
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 11 }, { 29, 0, height + 2 });
|
||||
}
|
||||
|
||||
session->WoodenSupportsPrependTo = ps;
|
||||
session.WoodenSupportsPrependTo = ps;
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
wooden_a_supports_paint_setup(session, 0, 1, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 0, 1, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
|
||||
break;
|
||||
case 1:
|
||||
wooden_a_supports_paint_setup(session, 1, 2, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 1, 2, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_8);
|
||||
break;
|
||||
case 2:
|
||||
wooden_a_supports_paint_setup(session, 0, 3, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 0, 3, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_8);
|
||||
break;
|
||||
case 3:
|
||||
wooden_a_supports_paint_setup(session, 1, 4, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
|
||||
break;
|
||||
}
|
||||
@@ -267,13 +267,13 @@ static void paint_go_karts_track_flat_to_25_deg_up(
|
||||
|
||||
/** rct2: 0x */
|
||||
static void paint_go_karts_track_25_deg_up_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
paint_struct* ps;
|
||||
|
||||
imageId = go_karts_track_pieces_25_deg_up_to_flat[direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = go_karts_track_pieces_25_deg_up_to_flat[direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 28, 1 }, { 0, 2, height });
|
||||
@@ -283,7 +283,7 @@ static void paint_go_karts_track_25_deg_up_to_flat(
|
||||
ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 32, 1 }, { 2, 0, height });
|
||||
}
|
||||
|
||||
imageId = go_karts_track_pieces_25_deg_up_to_flat[direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = go_karts_track_pieces_25_deg_up_to_flat[direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 11 }, { 0, 29, height + 2 });
|
||||
@@ -293,24 +293,24 @@ static void paint_go_karts_track_25_deg_up_to_flat(
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 11 }, { 29, 0, height + 2 });
|
||||
}
|
||||
|
||||
session->WoodenSupportsPrependTo = ps;
|
||||
session.WoodenSupportsPrependTo = ps;
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
wooden_a_supports_paint_setup(session, 0, 5, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height - 8, TUNNEL_SQUARE_FLAT);
|
||||
break;
|
||||
case 1:
|
||||
wooden_a_supports_paint_setup(session, 1, 6, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height + 8, TUNNEL_14);
|
||||
break;
|
||||
case 2:
|
||||
wooden_a_supports_paint_setup(session, 0, 7, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_left(session, height + 8, TUNNEL_14);
|
||||
break;
|
||||
case 3:
|
||||
wooden_a_supports_paint_setup(session, 1, 8, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
paint_util_push_tunnel_right(session, height - 8, TUNNEL_SQUARE_FLAT);
|
||||
break;
|
||||
}
|
||||
@@ -321,7 +321,7 @@ static void paint_go_karts_track_25_deg_up_to_flat(
|
||||
|
||||
/** rct2: 0x0074A788 */
|
||||
static void paint_go_karts_track_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_go_karts_track_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -329,7 +329,7 @@ static void paint_go_karts_track_25_deg_down(
|
||||
|
||||
/** rct2: 0x0074A798 */
|
||||
static void paint_go_karts_track_flat_to_25_deg_down(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_go_karts_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -337,7 +337,7 @@ static void paint_go_karts_track_flat_to_25_deg_down(
|
||||
|
||||
/** rct2: 0x0074A7A8 */
|
||||
static void paint_go_karts_track_25_deg_down_to_flat(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_go_karts_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement);
|
||||
@@ -345,7 +345,7 @@ static void paint_go_karts_track_25_deg_down_to_flat(
|
||||
|
||||
/** rct2: 0x */
|
||||
static void paint_go_karts_station(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
const auto* stationObj = ride.GetStationObject();
|
||||
@@ -359,7 +359,7 @@ static void paint_go_karts_station(
|
||||
sprites = go_karts_track_pieces_starting_grid_end;
|
||||
}
|
||||
|
||||
imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = sprites[direction][0] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 28, 1 }, { 0, 2, height });
|
||||
@@ -371,16 +371,16 @@ static void paint_go_karts_station(
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
hasFence = track_paint_util_has_fence(EDGE_NW, session->MapPosition, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_NW, session.MapPosition, trackElement, ride, session.CurrentRotation);
|
||||
track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
hasFence = track_paint_util_has_fence(EDGE_NE, session->MapPosition, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_NE, session.MapPosition, trackElement, ride, session.CurrentRotation);
|
||||
track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height);
|
||||
}
|
||||
|
||||
imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = sprites[direction][1] | session.TrackColours[SCHEME_TRACK];
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 3 }, { 0, 29, height + 2 });
|
||||
@@ -396,12 +396,12 @@ static void paint_go_karts_station(
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
hasFence = track_paint_util_has_fence(EDGE_SE, session->MapPosition, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation);
|
||||
track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
hasFence = track_paint_util_has_fence(EDGE_SW, session->MapPosition, trackElement, ride, session->CurrentRotation);
|
||||
hasFence = track_paint_util_has_fence(EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation);
|
||||
track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, height);
|
||||
}
|
||||
|
||||
@@ -413,40 +413,40 @@ static void paint_go_karts_station(
|
||||
{
|
||||
case 0:
|
||||
imageId = (hasGreenLight ? SPR_GO_KARTS_START_POLE_GREEN_SW_NE : SPR_GO_KARTS_START_POLE_RED_SW_NE)
|
||||
| session->TrackColours[SCHEME_TRACK];
|
||||
| session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 1, 1, height + 4 });
|
||||
|
||||
imageId = (hasGreenLight ? SPR_GO_KARTS_START_LIGHTS_GREEN_SW_NE : SPR_GO_KARTS_START_LIGHTS_RED_SW_NE)
|
||||
| session->TrackColours[SCHEME_TRACK];
|
||||
| session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 1, 28, height + 4 });
|
||||
break;
|
||||
case 1:
|
||||
imageId = SPR_GO_KARTS_START_POLE_NW_SE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_START_POLE_NW_SE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 1, 28, height + 4 });
|
||||
|
||||
imageId = SPR_GO_KARTS_START_LIGHTS_NW_SE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_START_LIGHTS_NW_SE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 28, 28, height + 4 });
|
||||
break;
|
||||
case 2:
|
||||
imageId = SPR_GO_KARTS_START_POLE_NE_SW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_START_POLE_NE_SW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 28, 1, height + 4 });
|
||||
|
||||
imageId = SPR_GO_KARTS_START_LIGHTS_NE_SW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_START_LIGHTS_NE_SW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 28, 28, height + 4 });
|
||||
break;
|
||||
case 3:
|
||||
imageId = (hasGreenLight ? SPR_GO_KARTS_START_POLE_GREEN_SE_NW : SPR_GO_KARTS_START_POLE_RED_SE_NW)
|
||||
| session->TrackColours[SCHEME_TRACK];
|
||||
| session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 1, 1, height + 4 });
|
||||
|
||||
imageId = (hasGreenLight ? SPR_GO_KARTS_START_LIGHTS_GREEN_SE_NW : SPR_GO_KARTS_START_LIGHTS_RED_SE_NW)
|
||||
| session->TrackColours[SCHEME_TRACK];
|
||||
| session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 28, 1, height + 4 });
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
@@ -454,7 +454,7 @@ static void paint_go_karts_station(
|
||||
|
||||
/** rct2: 0x0074A7E8 */
|
||||
static void paint_go_karts_track_left_quarter_turn_1_tile(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
@@ -462,40 +462,40 @@ static void paint_go_karts_track_left_quarter_turn_1_tile(
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_NW_NE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_NW_NE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 28, 1 }, { 0, 2, height });
|
||||
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_NW_NE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_NW_NE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 3 }, { 29, 2, height + 2 });
|
||||
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_NW_NE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_NW_NE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 16, 1, 3 }, { 14, 29, height + 2 });
|
||||
break;
|
||||
case 1:
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_NE_SE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_NE_SE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 30, 1 }, { 0, 0, height });
|
||||
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_NE_SE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_NE_SE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 16, 1, 3 }, { 2, 29, height + 2 });
|
||||
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_NE_SE | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_NE_SE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 16, 3 }, { 29, 2, height + 2 });
|
||||
break;
|
||||
case 2:
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_SE_SW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_SE_SW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 32, 1 }, { 2, 0, height });
|
||||
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_SE_SW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_SE_SW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 3 }, { 2, 2, height + 2 });
|
||||
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_SE_SW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_SE_SW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 16, 3 }, { 29, 14, height + 2 });
|
||||
break;
|
||||
case 3:
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_SW_NW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_SW_NW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height });
|
||||
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_SW_NW | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_SW_NW | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 3 }, { 29, 29, height + 2 });
|
||||
|
||||
// The empty sprite isn't drawn
|
||||
@@ -516,7 +516,7 @@ static void paint_go_karts_track_left_quarter_turn_1_tile(
|
||||
break;
|
||||
}
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
@@ -524,7 +524,7 @@ static void paint_go_karts_track_left_quarter_turn_1_tile(
|
||||
|
||||
/** rct2: 0x0074A7F8 */
|
||||
static void paint_go_karts_track_right_quarter_turn_1_tile(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
paint_go_karts_track_left_quarter_turn_1_tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement);
|
||||
|
||||
@@ -30,7 +30,7 @@ enum
|
||||
* rct2: 0x006D5FAB
|
||||
*/
|
||||
void vehicle_visual_launched_freefall(
|
||||
paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
paint_session& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle,
|
||||
const rct_ride_entry_vehicle* vehicleEntry)
|
||||
{
|
||||
auto imageFlags = SPRITE_ID_PALETTE_COLOUR_2(vehicle->colours.body_colour, vehicle->colours.trim_colour);
|
||||
@@ -49,7 +49,7 @@ void vehicle_visual_launched_freefall(
|
||||
PaintAddImageAsParent(session, image_id, { 0, 0, z }, { 16, 16, 41 }, { -5, -5, z + 1 });
|
||||
|
||||
// Draw peeps:
|
||||
if (session->DPI.zoom_level < ZoomLevel{ 2 } && vehicle->num_peeps > 0 && !vehicle->IsGhost())
|
||||
if (session.DPI.zoom_level < ZoomLevel{ 2 } && vehicle->num_peeps > 0 && !vehicle->IsGhost())
|
||||
{
|
||||
baseImage_id = vehicleEntry->base_image_id + 9;
|
||||
if ((vehicle->restraints_position / 64) == 3)
|
||||
@@ -85,35 +85,35 @@ void vehicle_visual_launched_freefall(
|
||||
|
||||
/** rct2: 0x006FD1F8 */
|
||||
static void paint_launched_freefall_base(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = track_map_3x3[direction][trackSequence];
|
||||
|
||||
int32_t edges = edges_3x3[trackSequence];
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
|
||||
track_paint_util_paint_floor(
|
||||
session, edges, session->TrackColours[SCHEME_SUPPORTS], height, floorSpritesMetal, stationObject);
|
||||
session, edges, session.TrackColours[SCHEME_SUPPORTS], height, floorSpritesMetal, stationObject);
|
||||
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_TRACK], height,
|
||||
fenceSpritesMetal, session->CurrentRotation);
|
||||
session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_TRACK], height, fenceSpritesMetal,
|
||||
session.CurrentRotation);
|
||||
|
||||
if (trackSequence == 0)
|
||||
{
|
||||
uint32_t imageId = SPR_LAUNCHED_FREEFALL_TOWER_BASE | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = SPR_LAUNCHED_FREEFALL_TOWER_BASE | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 8, 8, height + 3 });
|
||||
|
||||
height += 32;
|
||||
imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 8, 8, height });
|
||||
|
||||
height += 32;
|
||||
imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 8, 8, height });
|
||||
|
||||
paint_util_set_vertical_tunnel(session, height + 32);
|
||||
@@ -159,7 +159,7 @@ static void paint_launched_freefall_base(
|
||||
|
||||
/** rct2: 0x006FD208 */
|
||||
static void paint_launched_freefall_tower_section(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
if (trackSequence == 1)
|
||||
@@ -167,13 +167,13 @@ static void paint_launched_freefall_tower_section(
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
|
||||
uint32_t imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 8, 8, height });
|
||||
|
||||
const TileElement* nextTileElement = reinterpret_cast<const TileElement*>(&trackElement) + 1;
|
||||
if (trackElement.IsLastForTile() || trackElement.GetClearanceZ() != nextTileElement->GetBaseZ())
|
||||
{
|
||||
imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT_TOP | session->TrackColours[SCHEME_TRACK];
|
||||
imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT_TOP | session.TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsChild(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
|
||||
}
|
||||
|
||||
|
||||
@@ -104,10 +104,10 @@ static const Vehicle* GetFirstVehicle(const Ride& ride)
|
||||
}
|
||||
|
||||
static void PaintMagicCarpetRiders(
|
||||
paint_session* session, const rct_ride_entry& rideEntry, const Vehicle& vehicle, Direction direction,
|
||||
paint_session& session, const rct_ride_entry& rideEntry, const Vehicle& vehicle, Direction direction,
|
||||
const CoordsXYZ& offset, const CoordsXYZ& bbOffset, const CoordsXYZ& bbSize)
|
||||
{
|
||||
if (session->DPI.zoom_level > ZoomLevel{ 1 })
|
||||
if (session.DPI.zoom_level > ZoomLevel{ 1 })
|
||||
return;
|
||||
|
||||
auto baseImageIndex = rideEntry.vehicles[0].base_image_id + 4 + direction;
|
||||
@@ -121,11 +121,11 @@ static void PaintMagicCarpetRiders(
|
||||
}
|
||||
|
||||
static void PaintMagicCarpetFrame(
|
||||
paint_session* session, Plane plane, Direction direction, const CoordsXYZ& offset, const CoordsXYZ& bbOffset,
|
||||
paint_session& session, Plane plane, Direction direction, const CoordsXYZ& offset, const CoordsXYZ& bbOffset,
|
||||
const CoordsXYZ& bbSize)
|
||||
{
|
||||
auto imageIndex = GetMagicCarpetFrameImage(plane, direction);
|
||||
auto imageTemplate = ImageId::FromUInt32(session->TrackColours[SCHEME_TRACK]);
|
||||
auto imageTemplate = ImageId::FromUInt32(session.TrackColours[SCHEME_TRACK]);
|
||||
auto imageId = imageTemplate.WithIndex(imageIndex);
|
||||
if (plane == Plane::Back)
|
||||
{
|
||||
@@ -138,17 +138,17 @@ static void PaintMagicCarpetFrame(
|
||||
}
|
||||
|
||||
static void PaintMagicCarpetPendulum(
|
||||
paint_session* session, Plane plane, int32_t swing, Direction direction, const CoordsXYZ& offset, const CoordsXYZ& bbOffset,
|
||||
paint_session& session, Plane plane, int32_t swing, Direction direction, const CoordsXYZ& offset, const CoordsXYZ& bbOffset,
|
||||
const CoordsXYZ& bbSize)
|
||||
{
|
||||
auto imageIndex = GetMagicCarpetPendulumImage(plane, direction, swing);
|
||||
auto imageTemplate = ImageId::FromUInt32(session->TrackColours[SCHEME_TRACK]);
|
||||
auto imageTemplate = ImageId::FromUInt32(session.TrackColours[SCHEME_TRACK]);
|
||||
auto imageId = imageTemplate.WithIndex(imageIndex);
|
||||
PaintAddImageAsChild(session, imageId, offset, bbSize, bbOffset);
|
||||
}
|
||||
|
||||
static void PaintMagicCarpetVehicle(
|
||||
paint_session* session, const Ride& ride, uint8_t direction, int32_t swing, CoordsXYZ offset, const CoordsXYZ& bbOffset,
|
||||
paint_session& session, const Ride& ride, uint8_t direction, int32_t swing, CoordsXYZ offset, const CoordsXYZ& bbOffset,
|
||||
const CoordsXYZ& bbSize)
|
||||
{
|
||||
const auto* rideEntry = ride.GetRideEntry();
|
||||
@@ -175,7 +175,7 @@ static void PaintMagicCarpetVehicle(
|
||||
|
||||
// Vehicle
|
||||
auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim);
|
||||
auto imageFlags = session->TrackColours[SCHEME_MISC];
|
||||
auto imageFlags = session.TrackColours[SCHEME_MISC];
|
||||
if (imageFlags != IMAGE_TYPE_REMAP)
|
||||
{
|
||||
imageTemplate = ImageId::FromUInt32(imageFlags);
|
||||
@@ -191,17 +191,17 @@ static void PaintMagicCarpetVehicle(
|
||||
}
|
||||
|
||||
static void PaintMagicCarpetStructure(
|
||||
paint_session* session, const Ride& ride, uint8_t direction, int8_t axisOffset, uint16_t height)
|
||||
paint_session& session, const Ride& ride, uint8_t direction, int8_t axisOffset, uint16_t height)
|
||||
{
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session->CurrentlyDrawnItem);
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session.CurrentlyDrawnItem);
|
||||
|
||||
auto swing = 0;
|
||||
auto* vehicle = GetFirstVehicle(ride);
|
||||
if (vehicle != nullptr)
|
||||
{
|
||||
swing = vehicle->Pitch;
|
||||
session->InteractionType = ViewportInteractionItem::Entity;
|
||||
session->CurrentlyDrawnItem = vehicle;
|
||||
session.InteractionType = ViewportInteractionItem::Entity;
|
||||
session.CurrentlyDrawnItem = vehicle;
|
||||
}
|
||||
|
||||
bound_box bb = MagicCarpetBounds[direction];
|
||||
@@ -222,12 +222,12 @@ static void PaintMagicCarpetStructure(
|
||||
PaintMagicCarpetPendulum(session, Plane::Front, swing, direction, offset, bbOffset, bbSize);
|
||||
PaintMagicCarpetFrame(session, Plane::Front, direction, offset, bbOffset, bbSize);
|
||||
|
||||
session->InteractionType = ViewportInteractionItem::Ride;
|
||||
session->CurrentlyDrawnItem = savedTileElement;
|
||||
session.InteractionType = ViewportInteractionItem::Ride;
|
||||
session.CurrentlyDrawnItem = savedTileElement;
|
||||
}
|
||||
|
||||
static void PaintMagicCarpet(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
uint8_t relativeTrackSequence = track_map_1x4[direction][trackSequence];
|
||||
@@ -240,22 +240,22 @@ static void PaintMagicCarpet(
|
||||
if (direction & 1)
|
||||
{
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES, 6, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES, 7, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
else
|
||||
{
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES, 5, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
metal_a_supports_paint_setup(
|
||||
session, METAL_SUPPORTS_TUBES, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
|
||||
session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
|
||||
if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
|
||||
{
|
||||
uint32_t imageId = SPR_STATION_BASE_D | session->TrackColours[SCHEME_SUPPORTS];
|
||||
uint32_t imageId = SPR_STATION_BASE_D | session.TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 });
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -30,14 +30,14 @@ enum
|
||||
};
|
||||
|
||||
static void PaintMotionSimulatorVehicle(
|
||||
paint_session* session, const Ride& ride, int8_t offsetX, int8_t offsetY, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, int8_t offsetX, int8_t offsetY, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
auto rideEntry = ride.GetRideEntry();
|
||||
if (rideEntry == nullptr)
|
||||
return;
|
||||
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session->CurrentlyDrawnItem);
|
||||
const TileElement* savedTileElement = static_cast<const TileElement*>(session.CurrentlyDrawnItem);
|
||||
CoordsXYZ offset(offsetX, offsetY, height + 2);
|
||||
|
||||
Vehicle* vehicle = nullptr;
|
||||
@@ -46,8 +46,8 @@ static void PaintMotionSimulatorVehicle(
|
||||
vehicle = GetEntity<Vehicle>(ride.vehicles[0]);
|
||||
if (vehicle != nullptr)
|
||||
{
|
||||
session->InteractionType = ViewportInteractionItem::Entity;
|
||||
session->CurrentlyDrawnItem = vehicle;
|
||||
session.InteractionType = ViewportInteractionItem::Entity;
|
||||
session.CurrentlyDrawnItem = vehicle;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ static void PaintMotionSimulatorVehicle(
|
||||
}
|
||||
|
||||
auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim);
|
||||
auto imageFlags = session->TrackColours[SCHEME_MISC];
|
||||
auto imageFlags = session.TrackColours[SCHEME_MISC];
|
||||
if (imageFlags != IMAGE_TYPE_REMAP)
|
||||
{
|
||||
imageTemplate = ImageId::FromUInt32(imageFlags);
|
||||
@@ -97,27 +97,27 @@ static void PaintMotionSimulatorVehicle(
|
||||
break;
|
||||
}
|
||||
|
||||
session->CurrentlyDrawnItem = savedTileElement;
|
||||
session->InteractionType = ViewportInteractionItem::Ride;
|
||||
session.CurrentlyDrawnItem = savedTileElement;
|
||||
session.InteractionType = ViewportInteractionItem::Ride;
|
||||
}
|
||||
|
||||
static void PaintMotionSimulator(
|
||||
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
trackSequence = track_map_2x2[direction][trackSequence];
|
||||
|
||||
int32_t edges = edges_2x2[trackSequence];
|
||||
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
|
||||
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_MISC]);
|
||||
|
||||
const StationObject* stationObject = ride.GetStationObject();
|
||||
|
||||
track_paint_util_paint_floor(session, edges, session->TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject);
|
||||
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_SUPPORTS], height,
|
||||
fenceSpritesRope, session->CurrentRotation);
|
||||
session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_SUPPORTS], height,
|
||||
fenceSpritesRope, session.CurrentRotation);
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
|
||||
Loaded 100 of 117 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user