mirror of
https://github.com/Lorenzooone/Pokemon-Gen3-to-Gen-X.git
synced 2026-10-02 14:17:12 -05:00
Implement learnable moves
This commit is contained in:
@@ -165,7 +165,11 @@ u8 handle_input_trading_menu(u8* cursor_y_pos, u8* cursor_x_pos, u16 keys, u8 UN
|
||||
return options[cursor_x][cursor_y]+1;
|
||||
}
|
||||
|
||||
if(keys & KEY_LEFT) {
|
||||
if(keys & KEY_B) {
|
||||
cursor_x = 0;
|
||||
cursor_y = PARTY_SIZE;
|
||||
}
|
||||
else if(keys & KEY_LEFT) {
|
||||
cursor_x = 0;
|
||||
if(cursor_y >= num_options[0])
|
||||
cursor_y = num_options[0]-1;
|
||||
@@ -366,6 +370,48 @@ u8 handle_input_iv_fix_menu(u16 keys) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 handle_input_learnable_message_moves_menu(u16 keys, u8* cursor_x_pos) {
|
||||
|
||||
if(keys & KEY_A) {
|
||||
if(*cursor_x_pos)
|
||||
return DENIED_LEARNING;
|
||||
return ENTER_LEARN_MENU;
|
||||
}
|
||||
|
||||
if(keys & KEY_B)
|
||||
*cursor_x_pos = 1;
|
||||
else if((keys & KEY_LEFT) || (keys & KEY_RIGHT))
|
||||
*cursor_x_pos ^= 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 handle_input_learnable_moves_menu(u16 keys, u8* cursor_y_pos) {
|
||||
|
||||
if(keys & KEY_A) {
|
||||
if((*cursor_y_pos) >= MOVES_SIZE)
|
||||
return DO_NOT_FORGET_MOVE;
|
||||
return 1+(*cursor_y_pos);
|
||||
}
|
||||
|
||||
if(keys & KEY_B)
|
||||
*cursor_y_pos = MOVES_SIZE;
|
||||
else if(keys & KEY_UP) {
|
||||
if(!(*cursor_y_pos))
|
||||
*cursor_y_pos = MOVES_SIZE;
|
||||
else
|
||||
*cursor_y_pos -= 1;
|
||||
}
|
||||
else if(keys & KEY_DOWN) {
|
||||
if((*cursor_y_pos) >= MOVES_SIZE)
|
||||
*cursor_y_pos = 0;
|
||||
else
|
||||
*cursor_y_pos += 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 handle_input_offer_options(u16 keys, u8* cursor_y_pos, u8* cursor_x_pos) {
|
||||
|
||||
if(keys & KEY_B)
|
||||
|
||||
Reference in New Issue
Block a user