diff --git a/C++ProjectTemplate b/C++ProjectTemplate index 125a100..739b0d6 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ diff --git a/main.cpp b/main.cpp index d683d43..fd8597b 100644 --- a/main.cpp +++ b/main.cpp @@ -1198,23 +1198,35 @@ goes on a very long time, I hope you can understand this is only for testing pur }break; case BattleState::MOVE_SELECT:{ if (LeftPressed()) { - if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x-1,SELECTED_MOVE_SQUARE.y})) { - SELECTED_MOVE_SQUARE.x-=1; + for (int i=1;i<=3;i++) { + if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x-i,SELECTED_MOVE_SQUARE.y})) { + SELECTED_MOVE_SQUARE.x-=i; + break; + } } } if (RightPressed()) { - if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x+1,SELECTED_MOVE_SQUARE.y})) { - SELECTED_MOVE_SQUARE.x+=1; + for (int i=1;i<=8;i++) { + if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x+i,SELECTED_MOVE_SQUARE.y})) { + SELECTED_MOVE_SQUARE.x+=i; + break; + } } } if (UpPressed()) { - if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x,SELECTED_MOVE_SQUARE.y-1})) { - SELECTED_MOVE_SQUARE.y-=1; + for (int i=1;i<=8;i++) { + if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x,SELECTED_MOVE_SQUARE.y-i})) { + SELECTED_MOVE_SQUARE.y-=i; + break; + } } } if (DownPressed()) { - if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x,SELECTED_MOVE_SQUARE.y+1})) { - SELECTED_MOVE_SQUARE.y+=1; + for (int i=1;i<=8;i++) { + if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x,SELECTED_MOVE_SQUARE.y+i})) { + SELECTED_MOVE_SQUARE.y+=i; + break; + } } } }break;