mirror of https://github.com/OpenRCT2/OpenRCT2.git
Replace gScenarioTicks with gCurrentTicks
This commit is contained in:
parent
e468dd325b
commit
3173a63726
|
@ -1371,7 +1371,7 @@ void window_guest_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
||||||
int32_t guestEntryTime = peep->GetParkEntryTime();
|
int32_t guestEntryTime = peep->GetParkEntryTime();
|
||||||
if (guestEntryTime != -1)
|
if (guestEntryTime != -1)
|
||||||
{
|
{
|
||||||
int32_t timeInPark = (gScenarioTicks - guestEntryTime) >> 11;
|
int32_t timeInPark = (gCurrentTicks - guestEntryTime) >> 11;
|
||||||
auto ft = Formatter();
|
auto ft = Formatter();
|
||||||
ft.Add<uint16_t>(timeInPark & 0xFFFF);
|
ft.Add<uint16_t>(timeInPark & 0xFFFF);
|
||||||
DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_TIME_IN_PARK, ft);
|
DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_TIME_IN_PARK, ft);
|
||||||
|
@ -1441,7 +1441,7 @@ void window_guest_rides_update(rct_window* w)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Every 2048 ticks do a full window_invalidate
|
// Every 2048 ticks do a full window_invalidate
|
||||||
int32_t number_of_ticks = gScenarioTicks - guest->GetParkEntryTime();
|
int32_t number_of_ticks = gCurrentTicks - guest->GetParkEntryTime();
|
||||||
if (!(number_of_ticks & 0x7FF))
|
if (!(number_of_ticks & 0x7FF))
|
||||||
w->Invalidate();
|
w->Invalidate();
|
||||||
|
|
||||||
|
|
|
@ -807,7 +807,7 @@ private:
|
||||||
|
|
||||||
bool IsRefreshOfGroupsRequired()
|
bool IsRefreshOfGroupsRequired()
|
||||||
{
|
{
|
||||||
uint32_t tick256 = floor2(gScenarioTicks, 256);
|
uint32_t tick256 = floor2(gCurrentTicks, 256);
|
||||||
if (_selectedView == _lastFindGroupsSelectedView)
|
if (_selectedView == _lastFindGroupsSelectedView)
|
||||||
{
|
{
|
||||||
if (_lastFindGroupsWait != 0 || _lastFindGroupsTick == tick256)
|
if (_lastFindGroupsWait != 0 || _lastFindGroupsTick == tick256)
|
||||||
|
@ -834,7 +834,7 @@ private:
|
||||||
|
|
||||||
void RefreshGroups()
|
void RefreshGroups()
|
||||||
{
|
{
|
||||||
_lastFindGroupsTick = floor2(gScenarioTicks, 256);
|
_lastFindGroupsTick = floor2(gCurrentTicks, 256);
|
||||||
_lastFindGroupsSelectedView = _selectedView;
|
_lastFindGroupsSelectedView = _selectedView;
|
||||||
_lastFindGroupsWait = 320;
|
_lastFindGroupsWait = 320;
|
||||||
_groups.clear();
|
_groups.clear();
|
||||||
|
|
|
@ -477,7 +477,6 @@ namespace OpenRCT2
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
gScenarioTicks = 0;
|
|
||||||
input_reset_place_obj_modifier();
|
input_reset_place_obj_modifier();
|
||||||
viewport_init_all();
|
viewport_init_all();
|
||||||
|
|
||||||
|
|
|
@ -354,7 +354,6 @@ void GameState::UpdateLogic(LogicTimings* timings)
|
||||||
report_time(LogicTimePart::NetworkFlush);
|
report_time(LogicTimePart::NetworkFlush);
|
||||||
|
|
||||||
gCurrentTicks++;
|
gCurrentTicks++;
|
||||||
gScenarioTicks++;
|
|
||||||
gSavedAge++;
|
gSavedAge++;
|
||||||
|
|
||||||
#ifdef ENABLE_SCRIPTING
|
#ifdef ENABLE_SCRIPTING
|
||||||
|
|
|
@ -333,8 +333,7 @@ namespace OpenRCT2
|
||||||
{
|
{
|
||||||
auto found = os.ReadWriteChunk(ParkFileChunkType::GENERAL, [this](OrcaStream::ChunkStream& cs) {
|
auto found = os.ReadWriteChunk(ParkFileChunkType::GENERAL, [this](OrcaStream::ChunkStream& cs) {
|
||||||
cs.ReadWrite(gGamePaused);
|
cs.ReadWrite(gGamePaused);
|
||||||
cs.ReadWrite(gScenarioTicks);
|
cs.ReadWrite(gCurrentTicks);
|
||||||
gCurrentTicks = gScenarioTicks;
|
|
||||||
cs.ReadWrite(gDateMonthTicks);
|
cs.ReadWrite(gDateMonthTicks);
|
||||||
cs.ReadWrite(gDateMonthsElapsed);
|
cs.ReadWrite(gDateMonthsElapsed);
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include "Weather.h"
|
#include "Weather.h"
|
||||||
|
|
||||||
|
#include "../Game.h"
|
||||||
#include "../config/Config.h"
|
#include "../config/Config.h"
|
||||||
#include "../interface/Viewport.h"
|
#include "../interface/Viewport.h"
|
||||||
#include "../ride/TrackDesign.h"
|
#include "../ride/TrackDesign.h"
|
||||||
|
@ -77,15 +78,15 @@ void DrawWeather(rct_drawpixelinfo* dpi, IWeatherDrawer* weatherDrawer)
|
||||||
*/
|
*/
|
||||||
static void DrawLightRain(IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height)
|
static void DrawLightRain(IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height)
|
||||||
{
|
{
|
||||||
int32_t x_start = -static_cast<int32_t>(gScenarioTicks) + 8;
|
int32_t x_start = -static_cast<int32_t>(gCurrentTicks) + 8;
|
||||||
int32_t y_start = (gScenarioTicks * 3) + 7;
|
int32_t y_start = (gCurrentTicks * 3) + 7;
|
||||||
y_start = -y_start;
|
y_start = -y_start;
|
||||||
x_start += left;
|
x_start += left;
|
||||||
y_start += top;
|
y_start += top;
|
||||||
weatherDrawer->Draw(left, top, width, height, x_start, y_start, RainPattern);
|
weatherDrawer->Draw(left, top, width, height, x_start, y_start, RainPattern);
|
||||||
|
|
||||||
x_start = -static_cast<int32_t>(gScenarioTicks) + 0x18;
|
x_start = -static_cast<int32_t>(gCurrentTicks) + 0x18;
|
||||||
y_start = (gScenarioTicks * 4) + 0x0D;
|
y_start = (gCurrentTicks * 4) + 0x0D;
|
||||||
y_start = -y_start;
|
y_start = -y_start;
|
||||||
x_start += left;
|
x_start += left;
|
||||||
y_start += top;
|
y_start += top;
|
||||||
|
@ -98,29 +99,29 @@ static void DrawLightRain(IWeatherDrawer* weatherDrawer, int32_t left, int32_t t
|
||||||
*/
|
*/
|
||||||
static void DrawHeavyRain(IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height)
|
static void DrawHeavyRain(IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height)
|
||||||
{
|
{
|
||||||
int32_t x_start = -static_cast<int32_t>(gScenarioTicks);
|
int32_t x_start = -static_cast<int32_t>(gCurrentTicks);
|
||||||
int32_t y_start = gScenarioTicks * 5;
|
int32_t y_start = gCurrentTicks * 5;
|
||||||
y_start = -y_start;
|
y_start = -y_start;
|
||||||
x_start += left;
|
x_start += left;
|
||||||
y_start += top;
|
y_start += top;
|
||||||
weatherDrawer->Draw(left, top, width, height, x_start, y_start, RainPattern);
|
weatherDrawer->Draw(left, top, width, height, x_start, y_start, RainPattern);
|
||||||
|
|
||||||
x_start = -static_cast<int32_t>(gScenarioTicks) + 0x10;
|
x_start = -static_cast<int32_t>(gCurrentTicks) + 0x10;
|
||||||
y_start = (gScenarioTicks * 6) + 5;
|
y_start = (gCurrentTicks * 6) + 5;
|
||||||
y_start = -y_start;
|
y_start = -y_start;
|
||||||
x_start += left;
|
x_start += left;
|
||||||
y_start += top;
|
y_start += top;
|
||||||
weatherDrawer->Draw(left, top, width, height, x_start, y_start, RainPattern);
|
weatherDrawer->Draw(left, top, width, height, x_start, y_start, RainPattern);
|
||||||
|
|
||||||
x_start = -static_cast<int32_t>(gScenarioTicks) + 8;
|
x_start = -static_cast<int32_t>(gCurrentTicks) + 8;
|
||||||
y_start = (gScenarioTicks * 3) + 7;
|
y_start = (gCurrentTicks * 3) + 7;
|
||||||
y_start = -y_start;
|
y_start = -y_start;
|
||||||
x_start += left;
|
x_start += left;
|
||||||
y_start += top;
|
y_start += top;
|
||||||
weatherDrawer->Draw(left, top, width, height, x_start, y_start, RainPattern);
|
weatherDrawer->Draw(left, top, width, height, x_start, y_start, RainPattern);
|
||||||
|
|
||||||
x_start = -static_cast<int32_t>(gScenarioTicks) + 0x18;
|
x_start = -static_cast<int32_t>(gCurrentTicks) + 0x18;
|
||||||
y_start = (gScenarioTicks * 4) + 0x0D;
|
y_start = (gCurrentTicks * 4) + 0x0D;
|
||||||
y_start = -y_start;
|
y_start = -y_start;
|
||||||
x_start += left;
|
x_start += left;
|
||||||
y_start += top;
|
y_start += top;
|
||||||
|
@ -129,9 +130,9 @@ static void DrawHeavyRain(IWeatherDrawer* weatherDrawer, int32_t left, int32_t t
|
||||||
|
|
||||||
static void DrawLightSnow(IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height)
|
static void DrawLightSnow(IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height)
|
||||||
{
|
{
|
||||||
const uint32_t t = gScenarioTicks / 2;
|
const uint32_t t = gCurrentTicks / 2;
|
||||||
const int32_t negT = -static_cast<int32_t>(t);
|
const int32_t negT = -static_cast<int32_t>(t);
|
||||||
const double cosTick = static_cast<double>(gScenarioTicks) * 0.05;
|
const double cosTick = static_cast<double>(gCurrentTicks) * 0.05;
|
||||||
|
|
||||||
int32_t x_start = negT + 1 + (cos(1.0 + cosTick) * 6);
|
int32_t x_start = negT + 1 + (cos(1.0 + cosTick) * 6);
|
||||||
int32_t y_start = t + 1;
|
int32_t y_start = t + 1;
|
||||||
|
@ -150,29 +151,29 @@ static void DrawLightSnow(IWeatherDrawer* weatherDrawer, int32_t left, int32_t t
|
||||||
|
|
||||||
static void DrawHeavySnow(IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height)
|
static void DrawHeavySnow(IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height)
|
||||||
{
|
{
|
||||||
int32_t x_start = -static_cast<int32_t>(gScenarioTicks * 3) + 1;
|
int32_t x_start = -static_cast<int32_t>(gCurrentTicks * 3) + 1;
|
||||||
int32_t y_start = gScenarioTicks + 23;
|
int32_t y_start = gCurrentTicks + 23;
|
||||||
y_start = -y_start;
|
y_start = -y_start;
|
||||||
x_start += left;
|
x_start += left;
|
||||||
y_start += top;
|
y_start += top;
|
||||||
weatherDrawer->Draw(left, top, width, height, x_start, y_start, SnowPattern);
|
weatherDrawer->Draw(left, top, width, height, x_start, y_start, SnowPattern);
|
||||||
|
|
||||||
x_start = -static_cast<int32_t>(gScenarioTicks * 4) + 6;
|
x_start = -static_cast<int32_t>(gCurrentTicks * 4) + 6;
|
||||||
y_start = gScenarioTicks + 5;
|
y_start = gCurrentTicks + 5;
|
||||||
y_start = -y_start;
|
y_start = -y_start;
|
||||||
x_start += left;
|
x_start += left;
|
||||||
y_start += top;
|
y_start += top;
|
||||||
weatherDrawer->Draw(left, top, width, height, x_start, y_start, SnowPattern);
|
weatherDrawer->Draw(left, top, width, height, x_start, y_start, SnowPattern);
|
||||||
|
|
||||||
x_start = -static_cast<int32_t>(gScenarioTicks * 2) + 11;
|
x_start = -static_cast<int32_t>(gCurrentTicks * 2) + 11;
|
||||||
y_start = gScenarioTicks + 18;
|
y_start = gCurrentTicks + 18;
|
||||||
y_start = -y_start;
|
y_start = -y_start;
|
||||||
x_start += left;
|
x_start += left;
|
||||||
y_start += top;
|
y_start += top;
|
||||||
weatherDrawer->Draw(left, top, width, height, x_start, y_start, SnowPattern);
|
weatherDrawer->Draw(left, top, width, height, x_start, y_start, SnowPattern);
|
||||||
|
|
||||||
x_start = -static_cast<int32_t>(gScenarioTicks * 3) + 17;
|
x_start = -static_cast<int32_t>(gCurrentTicks * 3) + 17;
|
||||||
y_start = gScenarioTicks + 11;
|
y_start = gCurrentTicks + 11;
|
||||||
y_start = -y_start;
|
y_start = -y_start;
|
||||||
x_start += left;
|
x_start += left;
|
||||||
y_start += top;
|
y_start += top;
|
||||||
|
|
|
@ -316,7 +316,7 @@ void research_update()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gScenarioTicks % 32 != 0)
|
if (gCurrentTicks % 32 != 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -789,7 +789,7 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
||||||
if (State == PeepState::Walking && !OutsideOfPark && !(PeepFlags & PEEP_FLAGS_LEAVING_PARK) && GuestNumRides == 0
|
if (State == PeepState::Walking && !OutsideOfPark && !(PeepFlags & PEEP_FLAGS_LEAVING_PARK) && GuestNumRides == 0
|
||||||
&& GuestHeadingToRideId == RIDE_ID_NULL)
|
&& GuestHeadingToRideId == RIDE_ID_NULL)
|
||||||
{
|
{
|
||||||
uint32_t time_duration = gScenarioTicks - ParkEntryTime;
|
uint32_t time_duration = gCurrentTicks - ParkEntryTime;
|
||||||
time_duration /= 2048;
|
time_duration /= 2048;
|
||||||
|
|
||||||
if (time_duration >= 5)
|
if (time_duration >= 5)
|
||||||
|
@ -5370,7 +5370,7 @@ void Guest::UpdateEnteringPark()
|
||||||
SetState(PeepState::Falling);
|
SetState(PeepState::Falling);
|
||||||
|
|
||||||
OutsideOfPark = false;
|
OutsideOfPark = false;
|
||||||
ParkEntryTime = gScenarioTicks;
|
ParkEntryTime = gCurrentTicks;
|
||||||
increment_guests_in_park();
|
increment_guests_in_park();
|
||||||
decrement_guests_heading_for_park();
|
decrement_guests_heading_for_park();
|
||||||
auto intent = Intent(INTENT_ACTION_UPDATE_GUEST_COUNT);
|
auto intent = Intent(INTENT_ACTION_UPDATE_GUEST_COUNT);
|
||||||
|
|
|
@ -2137,7 +2137,7 @@ private:
|
||||||
void ImportParkFlags()
|
void ImportParkFlags()
|
||||||
{
|
{
|
||||||
// Date and srand
|
// Date and srand
|
||||||
gScenarioTicks = _s4.ticks;
|
gCurrentTicks = _s4.ticks;
|
||||||
scenario_rand_seed(_s4.random_a, _s4.random_b);
|
scenario_rand_seed(_s4.random_a, _s4.random_b);
|
||||||
gDateMonthsElapsed = static_cast<int32_t>(_s4.month);
|
gDateMonthsElapsed = static_cast<int32_t>(_s4.month);
|
||||||
gDateMonthTicks = _s4.day;
|
gDateMonthTicks = _s4.day;
|
||||||
|
|
|
@ -213,7 +213,7 @@ public:
|
||||||
|
|
||||||
gDateMonthsElapsed = static_cast<int32_t>(_s6.elapsed_months);
|
gDateMonthsElapsed = static_cast<int32_t>(_s6.elapsed_months);
|
||||||
gDateMonthTicks = _s6.current_day;
|
gDateMonthTicks = _s6.current_day;
|
||||||
gScenarioTicks = _s6.scenario_ticks;
|
gCurrentTicks = _s6.scenario_ticks;
|
||||||
|
|
||||||
scenario_rand_seed(_s6.scenario_srand_0, _s6.scenario_srand_1);
|
scenario_rand_seed(_s6.scenario_srand_0, _s6.scenario_srand_1);
|
||||||
|
|
||||||
|
@ -385,7 +385,6 @@ public:
|
||||||
// For savegames the filename can be arbitrary, so we have no choice but to rely on the name provided
|
// For savegames the filename can be arbitrary, so we have no choice but to rely on the name provided
|
||||||
String::Set(gScenarioFileName, sizeof(gScenarioFileName), _s6.scenario_filename);
|
String::Set(gScenarioFileName, sizeof(gScenarioFileName), _s6.scenario_filename);
|
||||||
}
|
}
|
||||||
gCurrentTicks = _s6.game_ticks_1;
|
|
||||||
gCurrentRealTimeTicks = 0;
|
gCurrentRealTimeTicks = 0;
|
||||||
|
|
||||||
ImportRides();
|
ImportRides();
|
||||||
|
|
|
@ -2938,7 +2938,7 @@ static void ride_measurement_update(Ride& ride, RideMeasurement& measurement)
|
||||||
gForces.VerticalG = std::clamp(gForces.VerticalG / 8, -127, 127);
|
gForces.VerticalG = std::clamp(gForces.VerticalG / 8, -127, 127);
|
||||||
gForces.LateralG = std::clamp(gForces.LateralG / 8, -127, 127);
|
gForces.LateralG = std::clamp(gForces.LateralG / 8, -127, 127);
|
||||||
|
|
||||||
if (gScenarioTicks & 1)
|
if (gCurrentTicks & 1)
|
||||||
{
|
{
|
||||||
gForces.VerticalG = (gForces.VerticalG + measurement.vertical[measurement.current_item]) / 2;
|
gForces.VerticalG = (gForces.VerticalG + measurement.vertical[measurement.current_item]) / 2;
|
||||||
gForces.LateralG = (gForces.LateralG + measurement.lateral[measurement.current_item]) / 2;
|
gForces.LateralG = (gForces.LateralG + measurement.lateral[measurement.current_item]) / 2;
|
||||||
|
@ -2951,7 +2951,7 @@ static void ride_measurement_update(Ride& ride, RideMeasurement& measurement)
|
||||||
auto velocity = std::min(std::abs((vehicle->velocity * 5) >> 16), 255);
|
auto velocity = std::min(std::abs((vehicle->velocity * 5) >> 16), 255);
|
||||||
auto altitude = std::min(vehicle->z / 8, 255);
|
auto altitude = std::min(vehicle->z / 8, 255);
|
||||||
|
|
||||||
if (gScenarioTicks & 1)
|
if (gCurrentTicks & 1)
|
||||||
{
|
{
|
||||||
velocity = (velocity + measurement.velocity[measurement.current_item]) / 2;
|
velocity = (velocity + measurement.velocity[measurement.current_item]) / 2;
|
||||||
altitude = (altitude + measurement.altitude[measurement.current_item]) / 2;
|
altitude = (altitude + measurement.altitude[measurement.current_item]) / 2;
|
||||||
|
@ -2960,7 +2960,7 @@ static void ride_measurement_update(Ride& ride, RideMeasurement& measurement)
|
||||||
measurement.velocity[measurement.current_item] = velocity & 0xFF;
|
measurement.velocity[measurement.current_item] = velocity & 0xFF;
|
||||||
measurement.altitude[measurement.current_item] = altitude & 0xFF;
|
measurement.altitude[measurement.current_item] = altitude & 0xFF;
|
||||||
|
|
||||||
if (gScenarioTicks & 1)
|
if (gCurrentTicks & 1)
|
||||||
{
|
{
|
||||||
measurement.current_item++;
|
measurement.current_item++;
|
||||||
measurement.num_items = std::max(measurement.num_items, measurement.current_item);
|
measurement.num_items = std::max(measurement.num_items, measurement.current_item);
|
||||||
|
@ -3063,7 +3063,7 @@ std::pair<RideMeasurement*, OpenRCT2String> Ride::GetMeasurement()
|
||||||
assert(measurement != nullptr);
|
assert(measurement != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
measurement->last_use_tick = gScenarioTicks;
|
measurement->last_use_tick = gCurrentTicks;
|
||||||
if (measurement->flags & 1)
|
if (measurement->flags & 1)
|
||||||
{
|
{
|
||||||
return { measurement.get(), { STR_EMPTY, {} } };
|
return { measurement.get(), { STR_EMPTY, {} } };
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include "TrackPaint.h"
|
#include "TrackPaint.h"
|
||||||
|
|
||||||
|
#include "../Game.h"
|
||||||
#include "../config/Config.h"
|
#include "../config/Config.h"
|
||||||
#include "../drawing/Drawing.h"
|
#include "../drawing/Drawing.h"
|
||||||
#include "../interface/Viewport.h"
|
#include "../interface/Viewport.h"
|
||||||
|
@ -1982,7 +1983,7 @@ 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 = gScenarioTicks >> 2 & 3;
|
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];
|
||||||
|
|
|
@ -676,7 +676,7 @@ static void paint_river_rapids_track_waterfall(
|
||||||
{
|
{
|
||||||
uint32_t imageId;
|
uint32_t imageId;
|
||||||
|
|
||||||
uint16_t frameNum = (gScenarioTicks / 2) & 7;
|
uint16_t frameNum = (gCurrentTicks / 2) & 7;
|
||||||
|
|
||||||
if (direction & 1)
|
if (direction & 1)
|
||||||
{
|
{
|
||||||
|
@ -739,7 +739,7 @@ static void paint_river_rapids_track_rapids(
|
||||||
{
|
{
|
||||||
uint32_t imageId;
|
uint32_t imageId;
|
||||||
|
|
||||||
uint16_t frameNum = (gScenarioTicks / 2) & 7;
|
uint16_t frameNum = (gCurrentTicks / 2) & 7;
|
||||||
|
|
||||||
if (direction & 1)
|
if (direction & 1)
|
||||||
{
|
{
|
||||||
|
@ -790,7 +790,7 @@ static void paint_river_rapids_track_whirlpool(
|
||||||
{
|
{
|
||||||
uint32_t imageId;
|
uint32_t imageId;
|
||||||
|
|
||||||
uint8_t frameNum = (gScenarioTicks / 4) % 16;
|
uint8_t frameNum = (gCurrentTicks / 4) % 16;
|
||||||
|
|
||||||
if (direction & 1)
|
if (direction & 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,7 +67,6 @@ bool gFirstTimeSaving = true;
|
||||||
uint16_t gSavedAge;
|
uint16_t gSavedAge;
|
||||||
uint32_t gLastAutoSaveUpdate = 0;
|
uint32_t gLastAutoSaveUpdate = 0;
|
||||||
|
|
||||||
uint64_t gScenarioTicks;
|
|
||||||
random_engine_t gScenarioRand;
|
random_engine_t gScenarioRand;
|
||||||
|
|
||||||
Objective gScenarioObjective;
|
Objective gScenarioObjective;
|
||||||
|
|
|
@ -427,7 +427,6 @@ static constexpr money32 COMPANY_VALUE_ON_FAILED_OBJECTIVE = 0x80000001;
|
||||||
|
|
||||||
extern const rct_string_id ScenarioCategoryStringIds[SCENARIO_CATEGORY_COUNT];
|
extern const rct_string_id ScenarioCategoryStringIds[SCENARIO_CATEGORY_COUNT];
|
||||||
|
|
||||||
extern uint64_t gScenarioTicks;
|
|
||||||
extern random_engine_t gScenarioRand;
|
extern random_engine_t gScenarioRand;
|
||||||
|
|
||||||
extern Objective gScenarioObjective;
|
extern Objective gScenarioObjective;
|
||||||
|
|
|
@ -470,7 +470,7 @@ int32_t Park::CalculateParkRating() const
|
||||||
for (auto litter : EntityList<Litter>())
|
for (auto litter : EntityList<Litter>())
|
||||||
{
|
{
|
||||||
// Ignore recently dropped litter
|
// Ignore recently dropped litter
|
||||||
if (litter->creationTick - gScenarioTicks >= 7680)
|
if (litter->creationTick - gCurrentTicks >= 7680)
|
||||||
{
|
{
|
||||||
litterCount++;
|
litterCount++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -772,7 +772,7 @@ void litter_create(const CoordsXYZD& litterPos, LitterType type)
|
||||||
litter->sprite_height_positive = 3;
|
litter->sprite_height_positive = 3;
|
||||||
litter->SubType = type;
|
litter->SubType = type;
|
||||||
litter->MoveTo(offsetLitterPos);
|
litter->MoveTo(offsetLitterPos);
|
||||||
litter->creationTick = gScenarioTicks;
|
litter->creationTick = gCurrentTicks;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -40,7 +40,6 @@ ride_id_t gTrackDesignSaveRideIndex = RIDE_ID_NULL;
|
||||||
uint8_t gClipHeight = 255;
|
uint8_t gClipHeight = 255;
|
||||||
CoordsXY gClipSelectionA = { 0, 0 };
|
CoordsXY gClipSelectionA = { 0, 0 };
|
||||||
CoordsXY gClipSelectionB = { MAXIMUM_TILE_START_XY, MAXIMUM_TILE_START_XY };
|
CoordsXY gClipSelectionB = { MAXIMUM_TILE_START_XY, MAXIMUM_TILE_START_XY };
|
||||||
uint32_t gScenarioTicks;
|
|
||||||
uint8_t gCurrentRotation;
|
uint8_t gCurrentRotation;
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
|
|
|
@ -64,7 +64,6 @@ namespace TestPaint
|
||||||
|
|
||||||
RCT2_CurrentViewportFlags = 0;
|
RCT2_CurrentViewportFlags = 0;
|
||||||
|
|
||||||
gScenarioTicks = 0;
|
|
||||||
RCT2_ScenarioTicks = 0;
|
RCT2_ScenarioTicks = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue