X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftimer.hpp;h=8dd9400f9cc5fa28c800497ad55975141115dacc;hb=4a486d92343d1824b311c234e9321e08f280fe68;hp=42e1b8fd897f91c462c45bbd8f4bc74570548bd4;hpb=5b7f9214cb929399f1a855ef5807018a9447d510;p=supertux.git diff --git a/src/timer.hpp b/src/timer.hpp index 42e1b8fd8..8dd9400f9 100644 --- a/src/timer.hpp +++ b/src/timer.hpp @@ -1,7 +1,7 @@ // $Id$ -// +// // SuperTux -// Copyright (C) 2005 Matthias Braun +// Copyright (C) 2006 Matthias Braun // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -12,7 +12,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA @@ -20,10 +20,11 @@ #ifndef __SUPERTUX_TIMER_H__ #define __SUPERTUX_TIMER_H__ -extern float global_time; +extern float game_time; +extern float real_time; /** - * new simpler timer designed to be used in the update functions of objects + * Simple timer designed to be used in the update functions of objects */ class Timer { @@ -48,9 +49,9 @@ public: float get_period() const { return period; } float get_timeleft() const - { return period - (global_time - cycle_start); } + { return period - (game_time - cycle_start); } float get_timegone() const - { return global_time - cycle_start; } + { return game_time - cycle_start; } bool started() const { return period != 0 && get_timeleft() > 0; } @@ -61,4 +62,3 @@ private: }; #endif -