mirror of https://github.com/OpenRCT2/OpenRCT2.git
game_command_set_staff_order
This commit is contained in:
parent
61485ed898
commit
ab9e250abe
|
@ -906,8 +906,8 @@ static uint32 game_do_command_table[58] = {
|
|||
0, // use new_game_command_table, original: 0x006BEFA1, 29
|
||||
0x006C09D1, // 30
|
||||
0x006C0B83,
|
||||
0x006C0BB5,
|
||||
0x00669C6D,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0x006649BD,
|
||||
0x006666E7,
|
||||
|
@ -969,7 +969,7 @@ static GAME_COMMAND_POINTER* new_game_command_table[58] = {
|
|||
game_command_hire_new_staff_member, //game_command_emptysub,
|
||||
game_command_emptysub, // 30
|
||||
game_command_emptysub,
|
||||
game_command_emptysub,
|
||||
game_command_set_staff_order,
|
||||
game_command_set_park_name,
|
||||
game_command_set_park_open,
|
||||
game_command_emptysub,
|
||||
|
|
|
@ -211,6 +211,40 @@ void game_command_hire_new_staff_member(int* eax, int* ebx, int* ecx, int* edx,
|
|||
*edi = newPeep->sprite_index;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006C0BB5
|
||||
*/
|
||||
void game_command_set_staff_order(int *eax, int *ebx, int *ecx, int *edx, int *esi, int *edi, int *ebp)
|
||||
{
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 40;
|
||||
uint8 bl = *ebx;
|
||||
uint8 order_id = *ebx >> 8;
|
||||
uint16 sprite_id = *edx;
|
||||
if(bl & 1){
|
||||
rct_peep *peep = &g_sprite_list[sprite_id].peep;
|
||||
if(order_id & 0x80){ // change costume
|
||||
uint8 sprite_type = order_id & ~0x80;
|
||||
sprite_type += 4;
|
||||
peep->sprite_type = sprite_type;
|
||||
peep->flags &= ~PEEP_FLAGS_SLOW_WALK;
|
||||
if(RCT2_ADDRESS(0x00982134, uint8)[sprite_type] & 1){
|
||||
peep->flags |= PEEP_FLAGS_SLOW_WALK;
|
||||
}
|
||||
peep->action_frame = 0;
|
||||
sub_693B58(peep);
|
||||
invalidate_sprite((rct_sprite*)peep);
|
||||
window_invalidate_by_number(WC_PEEP, sprite_id);
|
||||
window_invalidate_by_class(WC_STAFF_LIST);
|
||||
}else{
|
||||
peep->staff_orders = order_id;
|
||||
window_invalidate_by_number(WC_PEEP, sprite_id);
|
||||
window_invalidate_by_class(WC_STAFF_LIST);
|
||||
}
|
||||
}
|
||||
*ebx = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Updates the colour of the given staff type.
|
||||
*/
|
||||
|
|
|
@ -51,6 +51,7 @@ enum STAFF_ORDERS{
|
|||
|
||||
void game_command_update_staff_colour(int *eax, int *ebx, int *ecx, int *edx, int *esi, int *edi, int *ebp);
|
||||
void game_command_hire_new_staff_member(int *eax, int *ebx, int *ecx, int *edx, int *esi, int *edi, int *ebp);
|
||||
void game_command_set_staff_order(int *eax, int *ebx, int *ecx, int *edx, int *esi, int *edi, int *ebp);
|
||||
|
||||
void update_staff_colour(uint8 staffType, uint16 color);
|
||||
uint16 hire_new_staff_member(uint8 staffType);
|
||||
|
|
Loading…
Reference in New Issue