Skip to content

Commit

Permalink
Part of OpenRCT2#21421: incorporate feedback from OpenRCT2#21760
Browse files Browse the repository at this point in the history
  • Loading branch information
janclod committed Apr 9, 2024
1 parent c1ab906 commit faf4479
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/openrct2/GameState.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace OpenRCT2
ClimateState ClimateNext;
uint16_t ClimateUpdateTimer;
money64 Cash;
money64 CashHistory[FINANCE_GRAPH_SIZE];
money64 CashHistory[kFinanceGraphSize];
money64 InitialCash;
money64 GuestInitialCash;
uint8_t GuestInitialHappiness;
Expand All @@ -68,7 +68,7 @@ namespace OpenRCT2
money64 TotalIncomeFromAdmissions;
money64 TotalRideValueForMoney;
uint16_t WeeklyProfitAverageDivisor;
money64 WeeklyProfitHistory[FINANCE_GRAPH_SIZE];
money64 WeeklyProfitHistory[kFinanceGraphSize];
Objective ScenarioObjective;
uint16_t ScenarioParkRatingWarningDays;
money64 ScenarioCompletedCompanyValue;
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2/management/Finance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void FinancePayRideUpkeep()
void FinanceResetHistory()
{
auto& gameState = GetGameState();
for (uint8_t i = 0; i < FINANCE_GRAPH_SIZE; i++)
for (auto i = 0; i < kFinanceGraphSize; i++)
{
gameState.CashHistory[i] = kMoney64Undefined;
gameState.WeeklyProfitHistory[i] = kMoney64Undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2/management/Finance.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ enum class ExpenditureType : int32_t
};

constexpr uint8_t kExpenditureTableMonthCount = 16;
constexpr uint8_t FINANCE_GRAPH_SIZE = 128;
constexpr uint8_t kFinanceGraphSize = 128;

constexpr uint8_t MaxBankLoanInterestRate = 255;

Expand Down
4 changes: 2 additions & 2 deletions src/openrct2/network/NetworkBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ using namespace OpenRCT2;
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.

constexpr std::string_view kNetworkStreamVersion = "0";
constexpr uint8_t kNetworkStreamVersion = 0;

const std::string kNetworkStreamID = std::string(OPENRCT2_VERSION) + "-" + std::string(kNetworkStreamVersion);
const std::string kNetworkStreamID = std::string(OPENRCT2_VERSION) + "-" + std::to_string(kNetworkStreamVersion);

static Peep* _pickup_peep = nullptr;
static int32_t _pickup_peep_old_x = LOCATION_NULL;
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2/network/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <string_view>
#include <vector>

constexpr uint16_t kNetworkDefaultPort = 11753;
constexpr int32_t kNetworkDefaultPort = 11753;
constexpr uint16_t kNetworkLanBroadcastPort = 11754;
constexpr std::string_view kNetworkLanBroadcastMsg = "openrct2.server.query";
constexpr uint16_t kMaxServerDescriptionLength = 256;
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2/paint/tile_element/Paint.Surface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ static void ViewportSurfaceDrawTileSideBottom(

neighbourCornerHeight1 = cornerHeight2;

for (uint8_t tunnelIndex = 0; tunnelIndex < kTunnelMaxCount;)
for (auto tunnelIndex = 0; tunnelIndex < kTunnelMaxCount;)
{
if (curHeight >= cornerHeight1 || curHeight >= cornerHeight2)
{
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2/world/Park.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace OpenRCT2
std::vector<CoordsXYZD> Entrances;
uint32_t Size;
money64 Value;
money64 ValueHistory[FINANCE_GRAPH_SIZE];
money64 ValueHistory[kFinanceGraphSize];

bool IsOpen() const;
};
Expand Down

0 comments on commit faf4479

Please sign in to comment.