Some more header cleanup
Now it only takes 38s to build after touching irr_driver.hpp, vs prev 1m 10s. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@13602 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
a7b990a49f
commit
f83a30db47
@ -510,6 +510,7 @@ supertuxkart_SOURCES = \
|
||||
utils/string_utils.hpp \
|
||||
utils/synchronised.hpp \
|
||||
utils/time.hpp \
|
||||
utils/time.cpp \
|
||||
utils/translation.cpp \
|
||||
utils/translation.hpp \
|
||||
utils/utf8.h \
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "guiengine/scalable_font.hpp"
|
||||
#include "guiengine/widget.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "utils/ptr_vector.hpp"
|
||||
|
||||
@ -28,10 +29,10 @@
|
||||
|
||||
using namespace GUIEngine;
|
||||
|
||||
using namespace irr;
|
||||
using namespace core;
|
||||
using namespace gui;
|
||||
using namespace io;
|
||||
using namespace irr;
|
||||
using namespace scene;
|
||||
using namespace video;
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "guiengine/event_handler.hpp"
|
||||
#include "guiengine/modaldialog.hpp"
|
||||
#include "guiengine/screen.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "input/device_manager.hpp"
|
||||
#include "input/input.hpp"
|
||||
#include "karts/controller/controller.hpp"
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "config/user_config.hpp"
|
||||
#include "graphics/camera.hpp"
|
||||
#include "graphics/explosion.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/material_manager.hpp"
|
||||
#include "graphics/particle_emitter.hpp"
|
||||
#include "graphics/particle_kind.hpp"
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "audio/music_manager.hpp"
|
||||
#include "audio/sfx_base.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "karts/abstract_kart.hpp"
|
||||
#include "karts/kart.hpp"
|
||||
#include "karts/kart_model.hpp"
|
||||
@ -434,4 +435,3 @@ void SoccerWorld::countdownReachedZero()
|
||||
World *world = World::getWorld();
|
||||
world->setPhase(World::RACE_PHASE);
|
||||
} // countdownReachedZero
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "physics/irr_debug_drawer.hpp"
|
||||
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "karts/abstract_kart.hpp"
|
||||
#include "modes/world.hpp"
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "physics/physics.hpp"
|
||||
|
||||
#include "animations/three_d_animation.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "karts/kart_properties.hpp"
|
||||
#include "karts/rescue_animation.hpp"
|
||||
#include "network/race_state.hpp"
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "challenges/unlock_manager.hpp"
|
||||
#include "config/user_config.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "guiengine/widgets/icon_button_widget.hpp"
|
||||
#include "guiengine/widgets/label_widget.hpp"
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "tracks/track_object.hpp"
|
||||
|
||||
#include "animations/three_d_animation.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "io/xml_node.hpp"
|
||||
#include "input/device_manager.hpp"
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "audio/sfx_base.hpp"
|
||||
#include "audio/sfx_buffer.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/material_manager.hpp"
|
||||
#include "graphics/particle_emitter.hpp"
|
||||
#include "graphics/particle_kind_manager.hpp"
|
||||
|
29
src/utils/time.cpp
Normal file
29
src/utils/time.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
//
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2004 Steve Baker <sjbaker1@airmail.net>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 3
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// 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 02111-1307, USA.
|
||||
|
||||
#include "utils/time.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
|
||||
/** Returns a time based on an arbitrary 'epoch' (e.g. could be start
|
||||
* time of the application, 1.1.1970, ...).
|
||||
* The value is a double precision floating point value in seconds.
|
||||
*/
|
||||
double Time::getRealTime(long startAt)
|
||||
{
|
||||
return irr_driver->getRealTime()/1000.0;
|
||||
} // getTimeSinceEpoch
|
@ -30,7 +30,6 @@
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include "graphics/irr_driver.hpp"
|
||||
|
||||
class Time
|
||||
{
|
||||
@ -82,11 +81,8 @@ public:
|
||||
* time of the application, 1.1.1970, ...).
|
||||
* The value is a double precision floating point value in seconds.
|
||||
*/
|
||||
static double getRealTime(long startAt=0)
|
||||
{
|
||||
return irr_driver->getDevice()->getTimer()->getRealTime()/1000.0;
|
||||
}; // getTimeSinceEpoch
|
||||
|
||||
static double getRealTime(long startAt=0);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
/**
|
||||
* \brief Compare two different times.
|
||||
|
Loading…
Reference in New Issue
Block a user