supertux
debug.hpp
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 
17 #ifndef HEADER_SUPERTUX_SUPERTUX_DEBUG_HPP
18 #define HEADER_SUPERTUX_SUPERTUX_DEBUG_HPP
19 
20 class Debug
21 {
22 public:
23  Debug();
24 
25  void set_use_bitmap_fonts(bool value);
26  bool get_use_bitmap_fonts() const;
27 
28  void set_game_speed_multiplier(float v);
29  float get_game_speed_multiplier() const { return m_game_speed_multiplier; }
30 
31 public:
34 
37 
38  // Draw frames even when visually nothing changes; this can be used to
39  // vaguely measure the impact of code changes which should increase the FPS
40  bool draw_redundant_frames;
41 
42  bool show_toolbox_tile_ids;
43 
44 private:
46  bool m_use_bitmap_fonts;
47 
49  float m_game_speed_multiplier;
50 
51 private:
52  Debug(const Debug&) = delete;
53  Debug& operator=(const Debug&) = delete;
54 };
55 
56 extern Debug g_debug;
57 
58 #endif
59 
60 /* EOF */
bool show_collision_rects
Show collision rectangles of moving objects.
Definition: debug.hpp:33
bool show_worldmap_path
Draw the path on the worldmap, including invisible paths.
Definition: debug.hpp:36
Definition: debug.hpp:20