debug.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. show_toolbox_tile_ids(false),
  25. hide_player_hud(false),
  26. m_use_bitmap_fonts(false),
  27. m_game_speed_multiplier(1.0f)
  28. {
  29. }
  30. void
  31. Debug::set_use_bitmap_fonts(bool value)
  32. {
  33. m_use_bitmap_fonts = value;
  34. Resources::load();
  35. }
  36. void
  37. Debug::set_game_speed_multiplier(float v)
  38. {
  39. m_game_speed_multiplier = v;
  40. log_info << m_game_speed_multiplier << std::endl;
  41. }
  42. /* EOF */