1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Fix rebase issues

This commit is contained in:
duncanspumpkin
2018-04-01 20:35:41 +01:00
parent c455ee0234
commit 986b5a3f4d
5 changed files with 30 additions and 32 deletions

View File

@@ -510,20 +510,20 @@ static bool peep_check_ride_price_at_entrance(rct_peep * peep, Ride * ride, mone
* such as "I'm hungry" after visiting a food shop.
* Works for Thirst/Hungry/Low Money/Bathroom
*/
static void peep_stop_purchase_thought(rct_peep * peep, uint8 ride_type)
void rct_peep::StopPurchaseThought(uint8 ride_type)
{
uint8 thought_type = PEEP_THOUGHT_TYPE_HUNGRY;
uint8 thoughtType = PEEP_THOUGHT_TYPE_HUNGRY;
if (!ride_type_has_flag(ride_type, RIDE_TYPE_FLAG_SELLS_FOOD))
{
thought_type = PEEP_THOUGHT_TYPE_THIRSTY;
thoughtType = PEEP_THOUGHT_TYPE_THIRSTY;
if (!ride_type_has_flag(ride_type, RIDE_TYPE_FLAG_SELLS_DRINKS))
{
thought_type = PEEP_THOUGHT_TYPE_RUNNING_OUT;
thoughtType = PEEP_THOUGHT_TYPE_RUNNING_OUT;
if (ride_type != RIDE_TYPE_CASH_MACHINE)
{
thought_type = PEEP_THOUGHT_TYPE_BATHROOM;
thoughtType = PEEP_THOUGHT_TYPE_BATHROOM;
if (!ride_type_has_flag(ride_type, RIDE_TYPE_FLAG_IS_BATHROOM))
{
return;
@@ -535,12 +535,12 @@ static void peep_stop_purchase_thought(rct_peep * peep, uint8 ride_type)
// Remove the related thought
for (sint32 i = 0; i < PEEP_MAX_THOUGHTS; ++i)
{
rct_peep_thought * thought = &peep->thoughts[i];
rct_peep_thought * thought = &thoughts[i];
if (thought->type == PEEP_THOUGHT_TYPE_NONE)
break;
if (thought->type != thought_type)
if (thought->type != thoughtType)
continue;
if (i < PEEP_MAX_THOUGHTS - 1)
@@ -548,9 +548,9 @@ static void peep_stop_purchase_thought(rct_peep * peep, uint8 ride_type)
memmove(thought, thought + 1, sizeof(rct_peep_thought) * (PEEP_MAX_THOUGHTS - i - 1));
}
peep->thoughts[PEEP_MAX_THOUGHTS - 1].type = PEEP_THOUGHT_TYPE_NONE;
thoughts[PEEP_MAX_THOUGHTS - 1].type = PEEP_THOUGHT_TYPE_NONE;
peep->window_invalidate_flags |= PEEP_INVALIDATE_PEEP_THOUGHTS;
window_invalidate_flags |= PEEP_INVALIDATE_PEEP_THOUGHTS;
i--;
}
}
@@ -687,7 +687,7 @@ void rct_peep::UpdateBuying()
{
ride_update_popularity(ride, 1);
peep_stop_purchase_thought(this, ride->type);
StopPurchaseThought(ride->type);
}
else
{
@@ -1942,8 +1942,6 @@ void rct_peep::UpdateRideOnSpiralSlide()
sprite_move(newX, newY, z, (rct_sprite *)this);
sprite_direction = (var_37 & 0xC) * 2;
invalidate_sprite_2((rct_sprite *)this);
Invalidate();
var_37++;

View File

@@ -906,7 +906,7 @@ static void peep_128_tick_update(rct_peep * peep, sint32 index)
}
peep->action_sprite_type = 0xFF;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
return;
}
@@ -1263,7 +1263,7 @@ static void peep_128_tick_update(rct_peep * peep, sint32 index)
peep->action = PEEP_ACTION_THROW_UP;
peep->action_frame = 0;
peep->action_sprite_image_offset = 0;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)peep);
}
}
@@ -1768,7 +1768,7 @@ static void set_sprite_type(rct_peep * peep, uint8 type)
}
peep->action_sprite_type = 0xFF;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
if (peep->state == PEEP_STATE_SITTING)
{
@@ -2064,7 +2064,7 @@ bool peep_pickup_place(rct_peep * peep, sint32 x, sint32 y, sint32 z, bool apply
{
peep->action_sprite_type = 0xFF;
peep->happiness_target = Math::Max(peep->happiness_target - 10, 0);
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
}
network_set_pickup_peep(game_command_playerid, nullptr);
@@ -2630,7 +2630,7 @@ static bool peep_update_fixing_fix_vehicle(bool firstRun, rct_peep * peep, Ride
peep->action = (scenario_rand() & 1) ? PEEP_ACTION_STAFF_FIX_2 : PEEP_ACTION_STAFF_FIX;
peep->action_sprite_image_offset = 0;
peep->action_frame = 0;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)peep);
}
@@ -2674,7 +2674,7 @@ static bool peep_update_fixing_fix_vehicle_malfunction(bool firstRun, rct_peep *
peep->action_sprite_image_offset = 0;
peep->action_frame = 0;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)peep);
}
@@ -2789,7 +2789,7 @@ static bool peep_update_fixing_fix_station_end(bool firstRun, rct_peep * peep)
peep->action_frame = 0;
peep->action_sprite_image_offset = 0;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)peep);
}
@@ -2916,7 +2916,7 @@ static bool peep_update_fixing_fix_station_start(bool firstRun, rct_peep * peep,
peep->action_frame = 0;
peep->action_sprite_image_offset = 0;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)peep);
}
@@ -2947,7 +2947,7 @@ static bool peep_update_fixing_fix_station_brakes(bool firstRun, rct_peep * peep
peep->action_frame = 0;
peep->action_sprite_image_offset = 0;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)peep);
}
@@ -3055,7 +3055,7 @@ static bool peep_update_fixing_finish_fix_or_inspect(bool firstRun, sint32 steps
peep->action_frame = 0;
peep->action_sprite_image_offset = 0;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)peep);
}
@@ -5562,7 +5562,7 @@ void peep_applause()
peep->action = PEEP_ACTION_CLAP;
peep->action_frame = 0;
peep->action_sprite_image_offset = 0;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)peep);
}
}
@@ -6314,7 +6314,7 @@ void peep_insert_new_thought(rct_peep * peep, uint8 thought_type, uint8 thought_
peep->action = action;
peep->action_frame = 0;
peep->action_sprite_image_offset = 0;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)peep);
}
@@ -10176,7 +10176,7 @@ static void peep_give_passing_peeps_pizza(rct_peep * peep, rct_peep * otherPeep)
otherPeep->action = PEEP_ACTION_WAVE_2;
otherPeep->action_frame = 0;
otherPeep->action_sprite_image_offset = 0;
UpdateCurrentActionSpriteType(otherPeep);
otherPeep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)otherPeep);
}
}
@@ -10195,7 +10195,7 @@ static void peep_make_passing_peeps_sick(rct_peep * peep, rct_peep * otherPeep)
otherPeep->action = PEEP_ACTION_THROW_UP;
otherPeep->action_frame = 0;
otherPeep->action_sprite_image_offset = 0;
UpdateCurrentActionSpriteType(otherPeep);
otherPeep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)otherPeep);
}
}
@@ -10241,7 +10241,7 @@ static void peep_easter_egg_peep_interactions(rct_peep * peep)
peep->action = PEEP_ACTION_JOY;
peep->action_frame = 0;
peep->action_sprite_image_offset = 0;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)peep);
}
}
@@ -11798,7 +11798,7 @@ static void peep_read_map(rct_peep * peep)
peep->action = PEEP_ACTION_READ_MAP;
peep->action_frame = 0;
peep->action_sprite_image_offset = 0;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)peep);
}
}

View File

@@ -420,7 +420,7 @@ void game_command_set_staff_order(sint32 * eax, sint32 * ebx, sint32 * ecx, sint
peep->peep_flags |= PEEP_FLAGS_SLOW_WALK;
}
peep->action_frame = 0;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)peep);
window_invalidate_by_number(WC_PEEP, sprite_id);
window_invalidate_by_class(WC_STAFF_LIST);
@@ -1495,7 +1495,7 @@ static sint32 staff_path_finding_entertainer(rct_peep * peep)
peep->action_frame = 0;
peep->action_sprite_image_offset = 0;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
invalidate_sprite_2((rct_sprite *)peep);
staff_entertainer_update_nearby_peeps(peep);
}

View File

@@ -1001,7 +1001,7 @@ void footpath_interrupt_peeps(sint32 x, sint32 y, sint32 z)
peep->destination_x = (peep->x & 0xFFE0) + 16;
peep->destination_y = (peep->y & 0xFFE0) + 16;
peep->destination_tolerance = 5;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
}
}
}

View File

@@ -208,7 +208,7 @@ static bool map_animation_invalidate_small_scenery(sint32 x, sint32 y, sint32 ba
peep->action = PEEP_ACTION_CHECK_TIME;
peep->action_frame = 0;
peep->action_sprite_image_offset = 0;
UpdateCurrentActionSpriteType(peep);
peep->UpdateCurrentActionSpriteType();
invalidate_sprite_1((rct_sprite*)peep);
break;
}