💿🐜 Antkeeper source code https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.3 KiB

  1. /*
  2. * Copyright (C) 2023 Christopher J. Howard
  3. *
  4. * This file is part of Antkeeper source code.
  5. *
  6. * Antkeeper source code is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Antkeeper source code is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with Antkeeper source code. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef ANTKEEPER_GAME_CONTROLS_HPP
  20. #define ANTKEEPER_GAME_CONTROLS_HPP
  21. #include "game/game.hpp"
  22. #include <engine/utility/json.hpp>
  23. #include <engine/input/gamepad.hpp>
  24. #include <filesystem>
  25. /**
  26. * Resets a control profile to default settings.
  27. *
  28. * @param profile Control profile to reset.
  29. */
  30. void reset_control_profile(::control_profile& profile);
  31. /**
  32. * Applies a control profile to the game context.
  33. *
  34. * @param ctx Game context.
  35. * @param profile Control profile to apply.
  36. */
  37. void apply_control_profile(::game& ctx, const ::control_profile& profile);
  38. /**
  39. * Updates a control profile after actions have been remapped.
  40. *
  41. * @param ctx Game context.
  42. * @param profile Control profile to update.
  43. */
  44. void update_control_profile(::game& ctx, ::control_profile& profile);
  45. void setup_window_controls(::game& ctx);
  46. void setup_menu_controls(::game& ctx);
  47. void setup_game_controls(::game& ctx);
  48. void setup_camera_controls(::game& ctx);
  49. void setup_ant_controls(::game& ctx);
  50. void setup_debug_controls(::game& ctx);
  51. void enable_window_controls(::game& ctx);
  52. void enable_menu_controls(::game& ctx);
  53. void enable_game_controls(::game& ctx);
  54. void enable_camera_controls(::game& ctx);
  55. void enable_ant_controls(::game& ctx);
  56. void enable_debug_controls(::game& ctx);
  57. void disable_window_controls(::game& ctx);
  58. void disable_menu_controls(::game& ctx);
  59. void disable_game_controls(::game& ctx);
  60. void disable_camera_controls(::game& ctx);
  61. void disable_ant_controls(::game& ctx);
  62. void disable_debug_controls(::game& ctx);
  63. #endif // ANTKEEPER_GAME_CONTROLS_HPP