From 60396c665861f8541b8d12a88414b538e209cb2f Mon Sep 17 00:00:00 2001 From: Richard Fine Date: Wed, 2 Jan 2019 14:10:05 +0000 Subject: [PATCH] Rename enums to modern style Change various PEEP_ENUM_TYPE names to PeepEnumType names, to match the more modern coding standard. --- src/openrct2/paint/sprite/Paint.Peep.cpp | 2 +- src/openrct2/peep/Guest.cpp | 26 ++++++------ src/openrct2/peep/Peep.cpp | 20 ++++----- src/openrct2/peep/Peep.h | 52 ++++++++++++------------ src/openrct2/peep/Staff.cpp | 10 ++--- src/openrct2/rct1/S4Importer.cpp | 10 ++--- src/openrct2/rct1/Tables.cpp | 4 +- src/openrct2/rct1/Tables.h | 2 +- 8 files changed, 63 insertions(+), 63 deletions(-) diff --git a/src/openrct2/paint/sprite/Paint.Peep.cpp b/src/openrct2/paint/sprite/Paint.Peep.cpp index 3bf5dc4aa0..cb9b0a70f6 100644 --- a/src/openrct2/paint/sprite/Paint.Peep.cpp +++ b/src/openrct2/paint/sprite/Paint.Peep.cpp @@ -69,7 +69,7 @@ void peep_paint(paint_session* session, const rct_peep* peep, int32_t imageDirec rct_peep_animation_entry sprite = g_peep_animation_entries[peep->sprite_type]; - PEEP_ACTION_SPRITE_TYPE spriteType = peep->action_sprite_type; + PeepActionSpriteType spriteType = peep->action_sprite_type; uint8_t imageOffset = peep->action_sprite_image_offset; if (peep->action == PEEP_ACTION_NONE_1) diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index fb77f1d07c..7d16cf49d1 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -266,7 +266,7 @@ static constexpr const uint8_t item_consumption_time[] = { }; /** rct2: 009823AC */ -static constexpr const PEEP_THOUGHT_TYPE crowded_thoughts[] = { +static constexpr const PeepThoughtType crowded_thoughts[] = { PEEP_THOUGHT_TYPE_LOST, PEEP_THOUGHT_TYPE_TIRED, PEEP_THOUGHT_TYPE_BAD_LITTER, @@ -361,7 +361,7 @@ static void peep_update_ride_nausea_growth(rct_peep* peep, Ride* ride); static bool peep_should_go_on_ride_again(rct_peep* peep, Ride* ride); static bool peep_should_preferred_intensity_increase(rct_peep* peep); static bool peep_really_liked_ride(rct_peep* peep, Ride* ride); -static PEEP_THOUGHT_TYPE peep_assess_surroundings(int16_t centre_x, int16_t centre_y, int16_t centre_z); +static PeepThoughtType peep_assess_surroundings(int16_t centre_x, int16_t centre_y, int16_t centre_z); static void peep_update_hunger(rct_peep* peep); static void peep_decide_whether_to_leave_park(rct_peep* peep); static void peep_leave_park(rct_peep* peep); @@ -379,7 +379,7 @@ void rct_peep::Tick128UpdateGuest(int32_t index) * is executed to once every four calls. */ if (peep_flags & PEEP_FLAGS_CROWDED) { - PEEP_THOUGHT_TYPE thought_type = crowded_thoughts[scenario_rand() & 0xF]; + PeepThoughtType thought_type = crowded_thoughts[scenario_rand() & 0xF]; if (thought_type != PEEP_THOUGHT_TYPE_NONE) { peep_insert_new_thought(this, thought_type, PEEP_THOUGHT_ITEM_NONE); @@ -439,7 +439,7 @@ void rct_peep::Tick128UpdateGuest(int32_t index) surroundings_thought_timeout = 0; if (x != LOCATION_NULL) { - PEEP_THOUGHT_TYPE thought_type = peep_assess_surroundings(x & 0xFFE0, y & 0xFFE0, z); + PeepThoughtType thought_type = peep_assess_surroundings(x & 0xFFE0, y & 0xFFE0, z); if (thought_type != PEEP_THOUGHT_TYPE_NONE) { @@ -469,7 +469,7 @@ void rct_peep::Tick128UpdateGuest(int32_t index) { Ride* ride = get_ride(current_ride); - PEEP_THOUGHT_TYPE thought_type = ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IN_RIDE) + PeepThoughtType thought_type = ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IN_RIDE) ? PEEP_THOUGHT_TYPE_GET_OUT : PEEP_THOUGHT_TYPE_GET_OFF; @@ -514,7 +514,7 @@ void rct_peep::Tick128UpdateGuest(int32_t index) if (outside_of_park == 0 && (state == PEEP_STATE_WALKING || state == PEEP_STATE_SITTING)) { uint8_t num_thoughts = 0; - PEEP_THOUGHT_TYPE possible_thoughts[5]; + PeepThoughtType possible_thoughts[5]; if (peep_flags & PEEP_FLAGS_LEAVING_PARK) { @@ -558,7 +558,7 @@ void rct_peep::Tick128UpdateGuest(int32_t index) if (num_thoughts != 0) { - PEEP_THOUGHT_TYPE chosen_thought = possible_thoughts[scenario_rand() % num_thoughts]; + PeepThoughtType chosen_thought = possible_thoughts[scenario_rand() % num_thoughts]; peep_insert_new_thought(this, chosen_thought, PEEP_THOUGHT_ITEM_NONE); @@ -588,7 +588,7 @@ void rct_peep::Tick128UpdateGuest(int32_t index) * the alternate time to the true branch). */ if (nausea >= 140) { - PEEP_THOUGHT_TYPE thought_type = PEEP_THOUGHT_TYPE_SICK; + PeepThoughtType thought_type = PEEP_THOUGHT_TYPE_SICK; if (nausea >= 200) { thought_type = PEEP_THOUGHT_TYPE_VERY_SICK; @@ -1304,7 +1304,7 @@ loc_69B119: if (itemValue > ((money16)(scenario_rand() & 0x07))) { // "I'm not paying that much for x" - PEEP_THOUGHT_TYPE thought_type = static_cast( + PeepThoughtType thought_type = static_cast( (shopItem >= 32 ? (PEEP_THOUGHT_TYPE_PHOTO2_MUCH + (shopItem - 32)) : (PEEP_THOUGHT_TYPE_BALLOON_MUCH + shopItem))); peep_insert_new_thought(this, thought_type, rideIndex); @@ -1321,7 +1321,7 @@ loc_69B119: if (itemValue >= (money32)(scenario_rand() & 0x07)) { // "This x is a really good value" - PEEP_THOUGHT_TYPE thought_item = static_cast( + PeepThoughtType thought_item = static_cast( (shopItem >= 32 ? (PEEP_THOUGHT_TYPE_PHOTO2 + (shopItem - 32)) : (PEEP_THOUGHT_TYPE_BALLOON + shopItem))); peep_insert_new_thought(this, thought_item, rideIndex); @@ -2690,7 +2690,7 @@ static bool peep_really_liked_ride(rct_peep* peep, Ride* ride) * * rct2: 0x0069BC9A */ -static PEEP_THOUGHT_TYPE peep_assess_surroundings(int16_t centre_x, int16_t centre_y, int16_t centre_z) +static PeepThoughtType peep_assess_surroundings(int16_t centre_x, int16_t centre_y, int16_t centre_z) { if ((tile_element_height(centre_x, centre_y) & 0xFFFF) > centre_z) return PEEP_THOUGHT_TYPE_NONE; @@ -6644,7 +6644,7 @@ static bool peep_find_ride_to_look_at(rct_peep* peep, uint8_t edge, uint8_t* rid } /* Part of 0x0069B8CC rct2: 0x0069BC31 */ -void rct_peep::SetSpriteType(PEEP_SPRITE_TYPE new_sprite_type) +void rct_peep::SetSpriteType(PeepSpriteType new_sprite_type) { if (sprite_type == new_sprite_type) return; @@ -6684,7 +6684,7 @@ struct item_pref_t { uint8_t type; // 0 for standard, 1 for extra uint32_t item; // And this with the relevant flags - PEEP_SPRITE_TYPE sprite_type; + PeepSpriteType sprite_type; }; // clang-format off diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 41f6d52886..9294099385 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -114,7 +114,7 @@ static constexpr const char *gPeepEasterEggNames[] = { /** rct2: 0x00981DB0 */ static struct { - PEEP_ACTION_EVENTS action; + PeepActionType action; uint8_t flags; } PeepThoughtToActionMap[] = { { PEEP_ACTION_SHAKE_HEAD, 1 }, @@ -293,13 +293,13 @@ static struct { PEEP_ACTION_NONE_2, 1 }, }; -static PEEP_ACTION_SPRITE_TYPE PeepSpecialSpriteToSpriteTypeMap[] = { +static PeepActionSpriteType PeepSpecialSpriteToSpriteTypeMap[] = { PEEP_ACTION_SPRITE_TYPE_NONE, PEEP_ACTION_SPRITE_TYPE_HOLD_MAT, PEEP_ACTION_SPRITE_TYPE_STAFF_MOWER }; -static PEEP_ACTION_SPRITE_TYPE PeepActionToSpriteTypeMap[] = { +static PeepActionSpriteType PeepActionToSpriteTypeMap[] = { PEEP_ACTION_SPRITE_TYPE_CHECK_TIME, PEEP_ACTION_SPRITE_TYPE_EAT_FOOD, PEEP_ACTION_SPRITE_TYPE_SHAKE_HEAD, @@ -511,7 +511,7 @@ bool rct_peep::CheckForPath() return false; } -PEEP_ACTION_SPRITE_TYPE rct_peep::GetActionSpriteType() +PeepActionSpriteType rct_peep::GetActionSpriteType() { if (action >= PEEP_ACTION_NONE_1) { // PEEP_ACTION_NONE_1 or PEEP_ACTION_NONE_2 @@ -538,7 +538,7 @@ void rct_peep::UpdateCurrentActionSpriteType() { return; } - PEEP_ACTION_SPRITE_TYPE newActionSpriteType = GetActionSpriteType(); + PeepActionSpriteType newActionSpriteType = GetActionSpriteType(); if (action_sprite_type == newActionSpriteType) { return; @@ -1127,7 +1127,7 @@ void rct_peep::Update1() direction = sprite_direction >> 3; } -void rct_peep::SetState(PEEP_STATE new_state) +void rct_peep::SetState(PeepState new_state) { peep_decrement_num_riders(this); state = new_state; @@ -1640,7 +1640,7 @@ void peep_update_days_in_queue() // clang-format off /** rct2: 0x009823A0 */ -static constexpr const enum PEEP_NAUSEA_TOLERANCE nausea_tolerance_distribution[] = { +static constexpr const enum PeepNauseaTolerance nausea_tolerance_distribution[] = { PEEP_NAUSEA_TOLERANCE_NONE, PEEP_NAUSEA_TOLERANCE_LOW, PEEP_NAUSEA_TOLERANCE_LOW, PEEP_NAUSEA_TOLERANCE_AVERAGE, PEEP_NAUSEA_TOLERANCE_AVERAGE, PEEP_NAUSEA_TOLERANCE_AVERAGE, @@ -2246,9 +2246,9 @@ int32_t peep_get_easteregg_name_id(rct_peep* peep) * ah:thought_arguments * esi: peep */ -void peep_insert_new_thought(rct_peep* peep, PEEP_THOUGHT_TYPE thought_type, uint8_t thought_arguments) +void peep_insert_new_thought(rct_peep* peep, PeepThoughtType thought_type, uint8_t thought_arguments) { - PEEP_ACTION_EVENTS action = PeepThoughtToActionMap[thought_type].action; + PeepActionType action = PeepThoughtToActionMap[thought_type].action; if (action != PEEP_ACTION_NONE_2 && peep->action >= PEEP_ACTION_NONE_1) { peep->action = action; @@ -3127,7 +3127,7 @@ void rct_peep::PerformNextAction(uint8_t& pathing_result) void rct_peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) { pathing_result = 0; - PEEP_ACTION_EVENTS previousAction = action; + PeepActionType previousAction = action; if (action == PEEP_ACTION_NONE_1) action = PEEP_ACTION_NONE_2; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 845fdaa20e..bfc8aec481 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -34,7 +34,7 @@ struct TileElement; struct Ride; -enum PEEP_TYPE : uint8_t +enum PeepType : uint8_t { PEEP_TYPE_GUEST, PEEP_TYPE_STAFF, @@ -42,7 +42,7 @@ enum PEEP_TYPE : uint8_t PEEP_TYPE_INVALID = 0xFF }; -enum PEEP_THOUGHT_TYPE : uint8_t +enum PeepThoughtType : uint8_t { PEEP_THOUGHT_TYPE_CANT_AFFORD_0 = 0, // "I can't afford" PEEP_THOUGHT_TYPE_SPENT_MONEY = 1, // "I've spent all my money" @@ -186,7 +186,7 @@ enum PEEP_THOUGHT_TYPE : uint8_t PEEP_THOUGHT_TYPE_NONE = 255 }; -enum PEEP_STATE : uint8_t +enum PeepState : uint8_t { PEEP_STATE_FALLING = 0, // Drowning is part of falling PEEP_STATE_1 = 1, @@ -214,13 +214,13 @@ enum PEEP_STATE : uint8_t PEEP_STATE_INSPECTING = 23 }; -enum PEEP_SITTING_SUB_STATE +enum PeepSittingSubState { PEEP_SITTING_TRYING_TO_SIT = 0, PEEP_SITTING_SAT_DOWN }; -enum PEEP_RIDE_SUB_STATE +enum PeepRideSubState { PEEP_RIDE_AT_ENTRANCE = 0, PEEP_RIDE_IN_ENTRANCE = 1, @@ -245,13 +245,13 @@ enum PEEP_RIDE_SUB_STATE PEEP_SHOP_LEAVE = 21 }; -enum PEEP_USING_BIN_SUB_STATE +enum PeepUsingBinSubState { PEEP_USING_BIN_WALKING_TO_BIN = 0, PEEP_USING_BIN_GOING_BACK, }; -enum PEEP_ACTION_EVENTS : uint8_t +enum PeepActionType : uint8_t { PEEP_ACTION_CHECK_TIME = 0, // If no food then check watch @@ -291,7 +291,7 @@ enum PEEP_ACTION_EVENTS : uint8_t PEEP_ACTION_NONE_2 = 255, }; -enum PEEP_ACTION_SPRITE_TYPE : uint8_t +enum PeepActionSpriteType : uint8_t { PEEP_ACTION_SPRITE_TYPE_NONE = 0, PEEP_ACTION_SPRITE_TYPE_CHECK_TIME = 1, @@ -334,7 +334,7 @@ enum PEEP_ACTION_SPRITE_TYPE : uint8_t PEEP_ACTION_SPRITE_TYPE_INVALID = 255 }; -enum PEEP_FLAGS : uint32_t +enum PeepFlags : uint32_t { PEEP_FLAGS_LEAVING_PARK = (1 << 0), PEEP_FLAGS_SLOW_WALK = (1 << 1), @@ -370,7 +370,7 @@ enum PEEP_FLAGS : uint32_t PEEP_FLAGS_TWITCH = (1u << 31), // Added for twitch integration }; -enum PEEP_NEXT_FLAGS +enum PeepNextFlags { PEEP_NEXT_FLAG_DIRECTION_MASK = 0x3, PEEP_NEXT_FLAG_IS_SLOPED = (1 << 2), @@ -378,7 +378,7 @@ enum PEEP_NEXT_FLAGS PEEP_NEXT_FLAG_UNUSED = (1 << 4), }; -enum PEEP_NAUSEA_TOLERANCE +enum PeepNauseaTolerance { PEEP_NAUSEA_TOLERANCE_NONE, PEEP_NAUSEA_TOLERANCE_LOW, @@ -386,7 +386,7 @@ enum PEEP_NAUSEA_TOLERANCE PEEP_NAUSEA_TOLERANCE_HIGH, }; -enum PEEP_ITEM +enum PeepItem { // item_standard_flags PEEP_ITEM_BALLOON = (1 << 0), @@ -443,7 +443,7 @@ enum PEEP_ITEM PEEP_ITEM_EMPTY_BOWL_BLUE = (1 << 21), }; -enum PEEP_SPRITE_TYPE : uint8_t +enum PeepSpriteType : uint8_t { PEEP_SPRITE_TYPE_NORMAL = 0, PEEP_SPRITE_TYPE_HANDYMAN = 1, @@ -499,7 +499,7 @@ enum PEEP_SPRITE_TYPE : uint8_t }; // Flags used by peep->window_invalidate_flags -enum PEEP_INVALIDATE +enum PeepInvalidate { PEEP_INVALIDATE_PEEP_THOUGHTS = 1, PEEP_INVALIDATE_PEEP_STATS = 1 << 1, @@ -509,7 +509,7 @@ enum PEEP_INVALIDATE }; // Flags used by peep_should_go_on_ride() -enum PEEP_RIDE_DECISION +enum PeepRideDecision { PEEP_RIDE_DECISION_AT_QUEUE = 1, PEEP_RIDE_DECISION_THINKING = 1 << 2, @@ -518,7 +518,7 @@ enum PEEP_RIDE_DECISION #pragma pack(push, 1) struct rct_peep_thought { - PEEP_THOUGHT_TYPE type; // 0 + PeepThoughtType type; // 0 uint8_t item; // 1 uint8_t freshness; // 2 larger is less fresh uint8_t fresh_timeout; // 3 updates every tick @@ -556,10 +556,10 @@ struct rct_peep uint8_t next_z; // 0x28 uint8_t next_flags; // 0x29 uint8_t outside_of_park; // 0x2A - PEEP_STATE state; // 0x2B + PeepState state; // 0x2B uint8_t sub_state; // 0x2C - PEEP_SPRITE_TYPE sprite_type; // 0x2D - PEEP_TYPE type; // 0x2E + PeepSpriteType sprite_type; // 0x2D + PeepType type; // 0x2E union { uint8_t staff_type; // 0x2F @@ -611,12 +611,12 @@ struct rct_peep }; // Normally 0, 1 for carrying sliding board on spiral slide ride, 2 for carrying lawn mower uint8_t special_sprite; // 0x6D - PEEP_ACTION_SPRITE_TYPE action_sprite_type; // 0x6E + PeepActionSpriteType action_sprite_type; // 0x6E // Seems to be used like a local variable, as it's always set before calling SwitchNextActionSpriteType, which // reads this again - PEEP_ACTION_SPRITE_TYPE next_action_sprite_type; // 0x6F + PeepActionSpriteType next_action_sprite_type; // 0x6F uint8_t action_sprite_image_offset; // 0x70 - PEEP_ACTION_EVENTS action; // 0x71 + PeepActionType action; // 0x71 uint8_t action_frame; // 0x72 uint8_t step_progress; // 0x73 union @@ -713,7 +713,7 @@ public: // Peep void Update(); bool UpdateAction(int16_t* actionX, int16_t* actionY, int16_t* xy_distance); bool UpdateAction(); - void SetState(PEEP_STATE new_state); + void SetState(PeepState new_state); void Remove(); void Invalidate(); void UpdateCurrentActionSpriteType(); @@ -811,7 +811,7 @@ public: // Peep void PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result); int32_t GetZOnSlope(int32_t tile_x, int32_t tile_y); void SwitchNextActionSpriteType(); - PEEP_ACTION_SPRITE_TYPE GetActionSpriteType(); + PeepActionSpriteType GetActionSpriteType(); public: // Guest void StopPurchaseThought(uint8_t ride_type); @@ -840,7 +840,7 @@ public: // Guest void CheckCantFindRide(); void CheckCantFindExit(); bool DecideAndBuyItem(uint8_t rideIndex, int32_t shopItem, money32 price); - void SetSpriteType(PEEP_SPRITE_TYPE new_sprite_type); + void SetSpriteType(PeepSpriteType new_sprite_type); }; assert_struct_size(rct_peep, 0x100); #pragma pack(pop) @@ -971,7 +971,7 @@ void peep_decrement_num_riders(rct_peep* peep); * ah:thought_arguments * esi: peep */ -void peep_insert_new_thought(rct_peep* peep, PEEP_THOUGHT_TYPE thought_type, uint8_t thought_arguments); +void peep_insert_new_thought(rct_peep* peep, PeepThoughtType thought_type, uint8_t thought_arguments); void peep_set_map_tooltip(rct_peep* peep); diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index 6f1f5335d1..41fcf165cd 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -284,17 +284,17 @@ static money32 staff_hire_new_staff_member( }; /* rct2: 0x009929FC */ - static constexpr const PEEP_SPRITE_TYPE spriteTypes[] = { + static constexpr const PeepSpriteType spriteTypes[] = { PEEP_SPRITE_TYPE_HANDYMAN, PEEP_SPRITE_TYPE_MECHANIC, PEEP_SPRITE_TYPE_SECURITY, PEEP_SPRITE_TYPE_ENTERTAINER_PANDA, }; - PEEP_SPRITE_TYPE sprite_type = spriteTypes[staff_type]; + PeepSpriteType sprite_type = spriteTypes[staff_type]; if (staff_type == STAFF_TYPE_ENTERTAINER) { - sprite_type = static_cast(PEEP_SPRITE_TYPE_ENTERTAINER_PANDA + entertainerType); + sprite_type = static_cast(PEEP_SPRITE_TYPE_ENTERTAINER_PANDA + entertainerType); } newPeep->name_string_idx = staffNames[staff_type]; newPeep->sprite_type = sprite_type; @@ -402,7 +402,7 @@ void game_command_set_staff_order( rct_peep* peep = &get_sprite(sprite_id)->peep; if (order_id & 0x80) { // change costume - auto sprite_type = static_cast((order_id & ~0x80) + 4); + auto sprite_type = static_cast((order_id & ~0x80) + 4); if (sprite_type >= std::size(peep_slow_walking_types)) { log_error("Invalid change costume order for sprite_type %u", sprite_type); @@ -2299,7 +2299,7 @@ void rct_peep::Tick128UpdateStaff() if (staff_type != STAFF_TYPE_SECURITY) return; - PEEP_SPRITE_TYPE newSpriteType = PEEP_SPRITE_TYPE_SECURITY_ALT; + PeepSpriteType newSpriteType = PEEP_SPRITE_TYPE_SECURITY_ALT; if (state != PEEP_STATE_PATROLLING) newSpriteType = PEEP_SPRITE_TYPE_SECURITY; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 5a95315b95..ae05e5c282 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1403,12 +1403,12 @@ private: dst->sprite_identifier = SPRITE_IDENTIFIER_PEEP; // Peep vs. staff (including which kind) dst->sprite_type = RCT1::GetPeepSpriteType(src->sprite_type); - dst->action = static_cast(src->action); + dst->action = static_cast(src->action); dst->special_sprite = src->special_sprite; - dst->next_action_sprite_type = static_cast(src->next_action_sprite_type); + dst->next_action_sprite_type = static_cast(src->next_action_sprite_type); dst->action_sprite_image_offset = src->action_sprite_image_offset; dst->no_action_frame_num = src->no_action_frame_num; - dst->action_sprite_type = static_cast(src->action_sprite_type); + dst->action_sprite_type = static_cast(src->action_sprite_type); dst->action_frame = src->action_frame; const rct_sprite_bounds* spriteBounds = g_peep_animation_entries[dst->sprite_type].sprite_bounds; @@ -1438,7 +1438,7 @@ private: dst->outside_of_park = src->outside_of_park; - dst->state = static_cast(src->state); + dst->state = static_cast(src->state); dst->sub_state = src->sub_state; dst->next_x = src->next_x; dst->next_y = src->next_y; @@ -1449,7 +1449,7 @@ private: dst->step_progress = src->step_progress; dst->vandalism_seen = src->vandalism_seen; - dst->type = static_cast(src->type); + dst->type = static_cast(src->type); dst->tshirt_colour = RCT1::GetColour(src->tshirt_colour); dst->trousers_colour = RCT1::GetColour(src->trousers_colour); diff --git a/src/openrct2/rct1/Tables.cpp b/src/openrct2/rct1/Tables.cpp index 08c1b47a5f..3132b86571 100644 --- a/src/openrct2/rct1/Tables.cpp +++ b/src/openrct2/rct1/Tables.cpp @@ -66,9 +66,9 @@ namespace RCT1 return map[colour]; } - PEEP_SPRITE_TYPE GetPeepSpriteType(uint8_t rct1SpriteType) + PeepSpriteType GetPeepSpriteType(uint8_t rct1SpriteType) { - static constexpr const PEEP_SPRITE_TYPE map[] = + static constexpr const PeepSpriteType map[] = { PEEP_SPRITE_TYPE_NORMAL, // 0x00 PEEP_SPRITE_TYPE_HANDYMAN, // 0x01 diff --git a/src/openrct2/rct1/Tables.h b/src/openrct2/rct1/Tables.h index 5288a13179..f77df9c440 100644 --- a/src/openrct2/rct1/Tables.h +++ b/src/openrct2/rct1/Tables.h @@ -22,7 +22,7 @@ namespace RCT1 }; colour_t GetColour(colour_t colour); - PEEP_SPRITE_TYPE GetPeepSpriteType(uint8_t rct1SpriteType); + PeepSpriteType GetPeepSpriteType(uint8_t rct1SpriteType); uint8_t GetTerrain(uint8_t terrain); uint8_t GetTerrainEdge(uint8_t terrainEdge);