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