debug.hpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // SuperTux
  2. // Copyright (C) 2018 Ingo Ruhnke <grumbel@gmail.com>
  3. //
  4. // This program is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. #ifndef HEADER_SUPERTUX_SUPERTUX_DEBUG_HPP
  17. #define HEADER_SUPERTUX_SUPERTUX_DEBUG_HPP
  18. class Debug
  19. {
  20. public:
  21. Debug();
  22. void set_use_bitmap_fonts(bool value);
  23. bool get_use_bitmap_fonts() const;
  24. void set_game_speed_multiplier(float v);
  25. float get_game_speed_multiplier() const { return m_game_speed_multiplier; }
  26. public:
  27. /** Show collision rectangles of moving objects */
  28. bool show_collision_rects;
  29. /** Draw the path on the worldmap, including invisible paths */
  30. bool show_worldmap_path;
  31. // Draw frames even when visually nothing changes; this can be used to
  32. // vaguely measure the impact of code changes which should increase the FPS
  33. bool draw_redundant_frames;
  34. private:
  35. /** Use old bitmap fonts instead of TTF */
  36. bool m_use_bitmap_fonts;
  37. /** Speed up or slow down the game */
  38. float m_game_speed_multiplier;
  39. private:
  40. Debug(const Debug&) = delete;
  41. Debug& operator=(const Debug&) = delete;
  42. };
  43. extern Debug g_debug;
  44. #endif
  45. /* EOF */