diff --git a/src/windows/guest.c b/src/windows/guest.c index 722522e746..9ede943524 100644 --- a/src/windows/guest.c +++ b/src/windows/guest.c @@ -1101,11 +1101,10 @@ void window_guest_overview_text_input(rct_window *w, int widgetIndex, char *text if (text == NULL) return; - RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, uint16) = 0x5AE; - - game_do_command(1, 1, w->number, *text, 22, *(text + 2), *(text + 1)); - game_do_command(2, 1, 0, *(text + 3), 22, *(text + 5), *(text + 4)); - game_do_command(0, 1, 0, *(text + 6), 22, *(text + 8), *(text + 7)); + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, uint16) = 1454; + game_do_command(1, GAME_COMMAND_FLAG_APPLY, w->number, *((int*)(text + 0)), GAME_COMMAND_SET_PEEP_NAME, *((int*)(text + 8)), *((int*)(text + 4))); + game_do_command(2, GAME_COMMAND_FLAG_APPLY, w->number, *((int*)(text + 12)), GAME_COMMAND_SET_PEEP_NAME, *((int*)(text + 20)), *((int*)(text + 16))); + game_do_command(0, GAME_COMMAND_FLAG_APPLY, w->number, *((int*)(text + 24)), GAME_COMMAND_SET_PEEP_NAME, *((int*)(text + 32)), *((int*)(text + 28))); } /* rct2: 0x696A5F */ diff --git a/src/windows/maze_construction.c b/src/windows/maze_construction.c index 9e68c4dd3e..4f11f5bd2f 100644 --- a/src/windows/maze_construction.c +++ b/src/windows/maze_construction.c @@ -190,7 +190,7 @@ static void window_maze_construction_entrance_mouseup(rct_window *w, int widgetI return; RCT2_GLOBAL(0x00F44191, uint8) = widgetIndex == WIDX_MAZE_ENTRANCE ? 0 : 1; - RCT2_GLOBAL(0x00F44192, uint8) = w->number; + RCT2_GLOBAL(0x00F44192, uint8) = (uint8)w->number; RCT2_GLOBAL(0x00F44193, uint8) = 0; RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) |= INPUT_FLAG_6; diff --git a/src/windows/staff.c b/src/windows/staff.c index 8f185db156..141ddc6b64 100644 --- a/src/windows/staff.c +++ b/src/windows/staff.c @@ -1162,10 +1162,9 @@ void window_staff_overview_text_input(rct_window *w, int widgetIndex, char *text return; RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, uint16) = 2979; - - game_do_command(1, 1, w->number, *text, GAME_COMMAND_SET_PEEP_NAME, *(text + 2), *(text + 1)); - game_do_command(2, 1, 0, *(text + 3), GAME_COMMAND_SET_PEEP_NAME, *(text + 5), *(text + 4)); - game_do_command(0, 1, 0, *(text + 6), GAME_COMMAND_SET_PEEP_NAME, *(text + 8), *(text + 7)); + game_do_command(1, GAME_COMMAND_FLAG_APPLY, w->number, *((int*)(text + 0)), GAME_COMMAND_SET_PEEP_NAME, *((int*)(text + 8)), *((int*)(text + 4))); + game_do_command(2, GAME_COMMAND_FLAG_APPLY, w->number, *((int*)(text + 12)), GAME_COMMAND_SET_PEEP_NAME, *((int*)(text + 20)), *((int*)(text + 16))); + game_do_command(0, GAME_COMMAND_FLAG_APPLY, w->number, *((int*)(text + 24)), GAME_COMMAND_SET_PEEP_NAME, *((int*)(text + 32)), *((int*)(text + 28))); } /* rct2: 0x006BE5FC */