debug.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. #include "supertux/debug.hpp"
  17. #include "supertux/resources.hpp"
  18. #include "util/log.hpp"
  19. Debug g_debug;
  20. Debug::Debug() :
  21. show_collision_rects(false),
  22. show_worldmap_path(false),
  23. draw_redundant_frames(false),
  24. m_use_bitmap_fonts(false),
  25. m_game_speed_multiplier(1.0f)
  26. {
  27. }
  28. void
  29. Debug::set_use_bitmap_fonts(bool value)
  30. {
  31. m_use_bitmap_fonts = value;
  32. Resources::load();
  33. }
  34. bool
  35. Debug::get_use_bitmap_fonts() const
  36. {
  37. return m_use_bitmap_fonts;
  38. }
  39. void
  40. Debug::set_game_speed_multiplier(float v)
  41. {
  42. m_game_speed_multiplier = v;
  43. log_info << m_game_speed_multiplier << std::endl;
  44. }
  45. /* EOF */