mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 11:33:03 +01:00
implement duck_remove_all and staff_reset_stats
This commit is contained in:
@@ -291,4 +291,24 @@ int mechanic_is_location_in_patrol(rct_peep *mechanic, int x, int y)
|
||||
return 1;
|
||||
|
||||
return staff_is_location_in_patrol_area(mechanic, x, y);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006C1955
|
||||
*/
|
||||
void staff_reset_stats()
|
||||
{
|
||||
uint16 spriteIndex;
|
||||
rct_peep *peep;
|
||||
|
||||
FOR_ALL_STAFF(spriteIndex, peep) {
|
||||
peep->time_in_park = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_YEAR, uint16);
|
||||
peep->staff_lawns_mown = 0;
|
||||
peep->staff_rides_fixed = 0;
|
||||
peep->staff_gardens_watered = 0;
|
||||
peep->staff_rides_inspected = 0;
|
||||
peep->staff_litter_swept = 0;
|
||||
peep->staff_bins_emptied = 0;
|
||||
}
|
||||
}
|
||||
@@ -54,5 +54,6 @@ void update_staff_colour(uint8 staffType, uint16 color);
|
||||
uint16 hire_new_staff_member(uint8 staffType);
|
||||
void sub_6C0C3F();
|
||||
int mechanic_is_location_in_patrol(rct_peep *mechanic, int x, int y);
|
||||
void staff_reset_stats();
|
||||
|
||||
#endif
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "management/research.h"
|
||||
#include "management/news_item.h"
|
||||
#include "object.h"
|
||||
#include "peep/staff.h"
|
||||
#include "platform/platform.h"
|
||||
#include "ride/ride.h"
|
||||
#include "scenario.h"
|
||||
@@ -323,9 +324,9 @@ int scenario_load_and_play_from_path(const char *path)
|
||||
award_reset();
|
||||
reset_all_ride_build_dates();
|
||||
date_reset();
|
||||
RCT2_CALLPROC_EBPSAFE(0x00674576);
|
||||
duck_remove_all();
|
||||
park_calculate_size();
|
||||
RCT2_CALLPROC_EBPSAFE(0x006C1955);
|
||||
staff_reset_stats();
|
||||
RCT2_GLOBAL(0x01358840, uint8) = 0;
|
||||
memset((void*)0x001358102, 0, 20);
|
||||
RCT2_GLOBAL(0x00135882E, uint16) = 0;
|
||||
|
||||
@@ -397,6 +397,23 @@ void duck_press(rct_duck *duck)
|
||||
sound_play_panned(SOUND_QUACK, 0x8001, duck->x, duck->y, duck->z);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct: 0x00674576
|
||||
*/
|
||||
void duck_remove_all()
|
||||
{
|
||||
rct_unk_sprite* sprite;
|
||||
uint16 spriteIndex, nextSpriteIndex;
|
||||
|
||||
for (spriteIndex = RCT2_GLOBAL(RCT2_ADDRESS_SPRITES_START_MISC, uint16); spriteIndex != SPRITE_INDEX_NULL; spriteIndex = nextSpriteIndex) {
|
||||
sprite = &(g_sprite_list[spriteIndex].unknown);
|
||||
nextSpriteIndex = sprite->next;
|
||||
if (sprite->misc_identifier == SPRITE_MISC_DUCK)
|
||||
sprite_remove((rct_sprite*)sprite);
|
||||
}
|
||||
}
|
||||
|
||||
static const rct_xy16 _moneyEffectMoveOffset[] = {
|
||||
{ 1, -1 },
|
||||
{ 1, 1 },
|
||||
|
||||
@@ -234,6 +234,7 @@ void create_balloon(int x, int y, int z, int colour, uint8 bl);
|
||||
void balloon_press(rct_balloon *balloon);
|
||||
void create_duck(int targetX, int targetY);
|
||||
void duck_press(rct_duck *duck);
|
||||
void duck_remove_all();
|
||||
rct_sprite *create_sprite(uint8 bl);
|
||||
void reset_sprite_list();
|
||||
void reset_0x69EBE4();
|
||||
|
||||
Reference in New Issue
Block a user