diff options
author | aaaaaa123456789 <aaaaaa123456789@acidch.at> | 2020-09-13 04:22:50 -0300 |
---|---|---|
committer | aaaaaa123456789 <aaaaaa123456789@acidch.at> | 2020-09-13 06:30:55 -0300 |
commit | 7dc95a0103af08c95c9093b6efa6c77af77a2538 (patch) | |
tree | 663537916626ab264bbdef4ea3606415457c36a3 /src/union_room_chat.c | |
parent | 58a2b62bae1406d2c768698ed13efcd6a5ffbeec (diff) |
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
Diffstat (limited to 'src/union_room_chat.c')
-rwxr-xr-x | src/union_room_chat.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/union_room_chat.c b/src/union_room_chat.c index ed39d3acf..fd2a95791 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -1017,12 +1017,12 @@ static void Chat_HandleInput(void) switch (sChat->funcState) { case 0: - if (JOY_NEW(START_BUTTON)) + if (gMain.newKeys & START_BUTTON) { if (sChat->bufferCursorPos) SetChatFunction(CHAT_FUNC_SEND); } - else if (JOY_NEW(SELECT_BUTTON)) + else if (gMain.newKeys & SELECT_BUTTON) { SetChatFunction(CHAT_FUNC_SWITCH); } @@ -1039,14 +1039,14 @@ static void Chat_HandleInput(void) SetChatFunction(CHAT_FUNC_ASK_QUIT); } } - else if (JOY_NEW(A_BUTTON)) + else if (gMain.newKeys & A_BUTTON) { AppendTextToMessage(); StartDisplaySubtask(CHATDISPLAY_FUNC_UPDATE_MSG, 0); StartDisplaySubtask(CHATDISPLAY_FUNC_CURSOR_BLINK, 1); sChat->funcState = 1; } - else if (JOY_NEW(R_BUTTON)) + else if (gMain.newKeys & R_BUTTON) { if (sChat->currentPage != UNION_ROOM_KB_PAGE_REGISTER) { @@ -1100,7 +1100,7 @@ static void Chat_Switch(void) shouldSwitchPages = FALSE; break; case MENU_NOTHING_CHOSEN: - if (JOY_NEW(SELECT_BUTTON)) + if (gMain.newKeys & SELECT_BUTTON) { PlaySE(SE_SELECT); Menu_MoveCursor(1); @@ -1420,13 +1420,13 @@ static void Chat_Register(void) } break; case 1: - if (JOY_NEW(A_BUTTON)) + if (gMain.newKeys & A_BUTTON) { RegisterTextAtRow(); StartDisplaySubtask(CHATDISPLAY_FUNC_RETURN_TO_KB, 0); sChat->funcState = 3; } - else if (JOY_NEW(B_BUTTON)) + else if (gMain.newKeys & B_BUTTON) { StartDisplaySubtask(CHATDISPLAY_FUNC_CANCEL_REGISTER, 0); sChat->funcState = 4; @@ -1457,7 +1457,7 @@ static void Chat_Register(void) sChat->funcState = 6; break; case 6: - if (JOY_NEW(A_BUTTON | B_BUTTON)) + if (gMain.newKeys & (A_BUTTON | B_BUTTON)) { StartDisplaySubtask(CHATDISPLAY_FUNC_DESTROY_YESNO, 0); sChat->funcState = 4; @@ -1591,7 +1591,7 @@ static bool32 HandleDPadInput(void) { do { - if (JOY_REPEAT(DPAD_UP)) + if (gMain.newAndRepeatedKeys & DPAD_UP) { if (sChat->currentRow > 0) sChat->currentRow--; @@ -1599,7 +1599,7 @@ static bool32 HandleDPadInput(void) sChat->currentRow = sKeyboardPageMaxRow[sChat->currentPage]; break; } - if (JOY_REPEAT(DPAD_DOWN)) + if (gMain.newAndRepeatedKeys & DPAD_DOWN) { if (sChat->currentRow < sKeyboardPageMaxRow[sChat->currentPage]) sChat->currentRow++; @@ -1609,7 +1609,7 @@ static bool32 HandleDPadInput(void) } if (sChat->currentPage != UNION_ROOM_KB_PAGE_REGISTER) { - if (JOY_REPEAT(DPAD_LEFT)) + if (gMain.newAndRepeatedKeys & DPAD_LEFT) { if (sChat->currentCol > 0) sChat->currentCol--; @@ -1617,7 +1617,7 @@ static bool32 HandleDPadInput(void) sChat->currentCol = 4; break; } - else if (JOY_REPEAT(DPAD_RIGHT)) + else if (gMain.newAndRepeatedKeys & DPAD_RIGHT) { if (sChat->currentCol < 4) sChat->currentCol++; @@ -2121,7 +2121,7 @@ static void Task_ReceiveChatMessage(u8 taskId) static bool8 TryAllocDisplay(void) { - sDisplay = Alloc(sizeof(struct UnionRoomChatDisplay)); + sDisplay = Alloc(sizeof(*sDisplay)); if (sDisplay && TryAllocSprites()) { ResetBgsAndClearDma3BusyFlags(0); |