From 123e8fdf53ffb40c7464d0559a49e048fed79d7d Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 20 Dec 2010 22:03:49 +0200 Subject: framework for modifying textures --- src/voxel.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/voxel.cpp') diff --git a/src/voxel.cpp b/src/voxel.cpp index f8a98942c..29f79992b 100644 --- a/src/voxel.cpp +++ b/src/voxel.cpp @@ -138,7 +138,7 @@ void VoxelManipulator::addArea(VoxelArea area) if(m_area.contains(area)) return; - TimeTaker timer("addArea", g_device, &addarea_time); + TimeTaker timer("addArea", g_irrlicht, &addarea_time); // Calculate new area VoxelArea new_area; @@ -290,7 +290,7 @@ void VoxelManipulator::interpolate(VoxelArea area) void VoxelManipulator::clearFlag(u8 flags) { // 0-1ms on moderate area - TimeTaker timer("clearFlag", g_device, &clearflag_time); + TimeTaker timer("clearFlag", g_irrlicht, &clearflag_time); v3s16 s = m_area.getExtent(); @@ -539,7 +539,7 @@ void VoxelManipulator::updateAreaWaterPressure(VoxelArea a, core::map &active_nodes, bool checked3_is_clear) { - TimeTaker timer("updateAreaWaterPressure", g_device, + TimeTaker timer("updateAreaWaterPressure", g_irrlicht, &updateareawaterpressure_time); emerge(a, 3); @@ -585,7 +585,7 @@ void VoxelManipulator::updateAreaWaterPressure(VoxelArea a, try { // 0-1ms @ recur_count <= 100 - //TimeTaker timer("getWaterPressure", g_device); + //TimeTaker timer("getWaterPressure", g_irrlicht); pr = getWaterPressure(p, highest_y, recur_count); } catch(ProcessingLimitException &e) @@ -613,7 +613,7 @@ void VoxelManipulator::updateAreaWaterPressure(VoxelArea a, try { // 0ms - //TimeTaker timer("spreadWaterPressure", g_device); + //TimeTaker timer("spreadWaterPressure", g_irrlicht); spreadWaterPressure(p, pr, a, active_nodes, 0); } catch(ProcessingLimitException &e) @@ -653,7 +653,7 @@ bool VoxelManipulator::flowWater(v3s16 removed_pos, //dstream<<"s1="<getTimer()->getRealTime(); + u32 timenow = g_irrlicht->getTime(); if(timenow >= stoptime || (stoptime < 0x80000000 && timenow > 0x80000000)) { @@ -870,15 +870,15 @@ void VoxelManipulator::flowWater( return; } - //TimeTaker timer1("flowWater (active_nodes)", g_device); + //TimeTaker timer1("flowWater (active_nodes)", g_irrlicht); //dstream<<"active_nodes.size() = "<getTimer()->getRealTime() + timelimit; + stoptime = g_irrlicht->getTime() + timelimit; } // Count of handled active nodes -- cgit v1.2.3