Properly and efficiently use split utility headers
authorPerttu Ahola <celeron55@gmail.com>
Sat, 16 Jun 2012 23:40:36 +0000 (02:40 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Sat, 16 Jun 2012 23:40:36 +0000 (02:40 +0300)
73 files changed:
src/CMakeLists.txt
src/camera.cpp
src/camera.h
src/chat.cpp
src/client.cpp
src/client.h
src/clientmap.cpp
src/clientserver.h
src/connection.cpp
src/connection.h
src/constants.h
src/content_cao.cpp
src/content_mapblock.cpp
src/content_mapnode.cpp
src/content_nodemeta.cpp
src/content_sao.cpp
src/craftdef.cpp
src/environment.h
src/filecache.cpp
src/genericobject.cpp
src/guiConfirmMenu.h
src/guiCreateWorld.cpp
src/guiCreateWorld.h
src/guiDeathScreen.h
src/guiInventoryMenu.cpp
src/guiInventoryMenu.h
src/guiKeyChangeMenu.h
src/guiMainMenu.cpp
src/guiMessageMenu.h
src/guiPasswordChange.h
src/guiPauseMenu.cpp
src/guiTextInputMenu.h
src/inventory.cpp
src/inventorymanager.cpp
src/itemdef.cpp
src/localplayer.cpp
src/map.cpp
src/map.h
src/mapblock.cpp
src/mapblock.h
src/mapblock_mesh.cpp
src/mapgen.h
src/mapnode.cpp
src/nameidmapping.cpp
src/nodedef.cpp
src/nodedef.h
src/nodemetadata.cpp
src/nodetimer.cpp
src/object_properties.cpp
src/player.cpp
src/profiler.h
src/quicktune.cpp
src/quicktune_shortcutter.h
src/scriptapi.cpp
src/serialization.cpp
src/serialization.h
src/server.cpp
src/server.h
src/servercommand.cpp
src/serverobject.cpp
src/serverobject.h
src/settings.h
src/sky.cpp
src/socket.cpp
src/sound_openal.cpp
src/staticobject.h
src/test.cpp
src/tile.cpp
src/tile.h
src/tool.cpp
src/utility.cpp [deleted file]
src/utility.h [deleted file]
src/voxel.cpp

index 3243530381eaa2a0fa2ff421a20e7532b9942b7d..3e9f6d35713e1543dfa1998a585cc020bca07d92 100644 (file)
@@ -199,7 +199,6 @@ set(common_SRCS
        mapsector.cpp
        map.cpp
        player.cpp
-       utility.cpp
        test.cpp
        sha1.cpp
        base64.cpp
index dca1c6d34d796f9de9aafb458580d7e8282f1d33..1ef594eeadacc5f762ae01374c850a94fea2dda3 100644 (file)
@@ -33,6 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "gamedef.h"
 #include "sound.h"
 #include "event.h"
+#include "util/numeric.h"
 
 Camera::Camera(scene::ISceneManager* smgr, MapDrawControl& draw_control,
                IGameDef *gamedef):
@@ -234,17 +235,17 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
 
                #if 1
                f32 bobknob = 1.2;
-               f32 bobtmp = sin(pow(bobfrac, bobknob) * PI);
-               //f32 bobtmp2 = cos(pow(bobfrac, bobknob) * PI);
+               f32 bobtmp = sin(pow(bobfrac, bobknob) * M_PI);
+               //f32 bobtmp2 = cos(pow(bobfrac, bobknob) * M_PI);
 
                v3f bobvec = v3f(
-                       0.3 * bobdir * sin(bobfrac * PI),
+                       0.3 * bobdir * sin(bobfrac * M_PI),
                        -0.28 * bobtmp * bobtmp,
                        0.);
 
                //rel_cam_pos += 0.2 * bobvec;
                //rel_cam_target += 0.03 * bobvec;
-               //rel_cam_up.rotateXYBy(0.02 * bobdir * bobtmp * PI);
+               //rel_cam_up.rotateXYBy(0.02 * bobdir * bobtmp * M_PI);
                float f = 1.0;
                f *= g_settings->getFloat("view_bobbing_amount");
                rel_cam_pos += bobvec * f;
@@ -253,10 +254,10 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
                rel_cam_target.Z -= 0.005 * bobvec.Z * f;
                //rel_cam_target.X -= 0.005 * bobvec.X * f;
                //rel_cam_target.Y -= 0.005 * bobvec.Y * f;
-               rel_cam_up.rotateXYBy(-0.03 * bobdir * bobtmp * PI * f);
+               rel_cam_up.rotateXYBy(-0.03 * bobdir * bobtmp * M_PI * f);
                #else
-               f32 angle_deg = 1 * bobdir * sin(bobfrac * PI);
-               f32 angle_rad = angle_deg * PI / 180;
+               f32 angle_deg = 1 * bobdir * sin(bobfrac * M_PI);
+               f32 angle_rad = angle_deg * M_PI / 180;
                f32 r = 0.05;
                v3f off = v3f(
                        r * sin(angle_rad),
@@ -289,7 +290,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
 
        // FOV and aspect ratio
        m_aspect = (f32)screensize.X / (f32) screensize.Y;
-       m_fov_y = fov_degrees * PI / 180.0;
+       m_fov_y = fov_degrees * M_PI / 180.0;
        // Increase vertical FOV on lower aspect ratios (<16:10)
        m_fov_y *= MYMAX(1.0, MYMIN(1.4, sqrt(16./10. / m_aspect)));
        // WTF is this? It can't be right
@@ -320,22 +321,22 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
        if (m_digging_button != -1)
        {
                f32 digfrac = m_digging_anim;
-               wield_position.X -= 30 * sin(pow(digfrac, 0.8f) * PI);
-               wield_position.Y += 15 * sin(digfrac * 2 * PI);
+               wield_position.X -= 30 * sin(pow(digfrac, 0.8f) * M_PI);
+               wield_position.Y += 15 * sin(digfrac * 2 * M_PI);
                wield_position.Z += 5 * digfrac;
 
                // Euler angles are PURE EVIL, so why not use quaternions?
                core::quaternion quat_begin(wield_rotation * core::DEGTORAD);
                core::quaternion quat_end(v3f(90, -10, -130) * core::DEGTORAD);
                core::quaternion quat_slerp;
-               quat_slerp.slerp(quat_begin, quat_end, sin(digfrac * PI));
+               quat_slerp.slerp(quat_begin, quat_end, sin(digfrac * M_PI));
                quat_slerp.toEuler(wield_rotation);
                wield_rotation *= core::RADTODEG;
        }
        else {
                f32 bobfrac = my_modf(m_view_bobbing_anim);
-               wield_position.X -= sin(bobfrac*PI*2.0) * 3.0;
-               wield_position.Y += sin(my_modf(bobfrac*2.0)*PI) * 3.0;
+               wield_position.X -= sin(bobfrac*M_PI*2.0) * 3.0;
+               wield_position.Y += sin(my_modf(bobfrac*2.0)*M_PI) * 3.0;
        }
        m_wieldnode->setPosition(wield_position);
        m_wieldnode->setRotation(wield_rotation);
@@ -538,7 +539,7 @@ void Camera::drawWieldedTool()
        // Draw the wielded node (in a separate scene manager)
        scene::ICameraSceneNode* cam = m_wieldmgr->getActiveCamera();
        cam->setAspectRatio(m_cameranode->getAspectRatio());
-       cam->setFOV(72.0*PI/180.0);
+       cam->setFOV(72.0*M_PI/180.0);
        cam->setNearValue(0.1);
        cam->setFarValue(100);
        m_wieldmgr->drawAll();
index b2c118f385d4a62e17617ea71683177c3525d2bc..763c4fd8c37dfd99152f1f84c73e3b791d41c48a 100644 (file)
@@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "inventory.h"
 #include "mesh.h"
 #include "tile.h"
-#include "utility.h"
+#include "util/numeric.h"
 #include <ICameraSceneNode.h>
 
 class LocalPlayer;
index e370d67e47427e4d03e879aa24ee2c802752304e..b9d115bd088c937fb7934a3c23ec252696d777ca 100644 (file)
@@ -19,10 +19,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "chat.h"
 #include "debug.h"
-#include "utility.h"
 #include <cassert>
 #include <cctype>
 #include <sstream>
+#include "util/string.h"
+#include "util/numeric.h"
 
 ChatBuffer::ChatBuffer(u32 scrollback):
        m_scrollback(scrollback),
index a563949d4ac755ae16b913a8930ba2ae8d46f468..1327feb1f001f910a47cca8e97a57a54e2d6d845 100644 (file)
@@ -18,7 +18,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include "client.h"
-#include "utility.h"
 #include <iostream>
 #include "clientserver.h"
 #include "jmutexautolock.h"
index 71ab4cc2991992b5fa5f3e7e891decb8713246ea..6b797e6276a505264f76f66396137a4e85f153d5 100644 (file)
@@ -28,12 +28,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <set>
 #include <vector>
 #include "clientobject.h"
-#include "utility.h" // For IntervalLimiter
 #include "gamedef.h"
 #include "inventorymanager.h"
 #include "filesys.h"
 #include "filecache.h"
 #include "localplayer.h"
+#include "util/pointedthing.h"
 
 struct MeshMakeData;
 class MapBlockMesh;
index 0efe2d368dd06f1790378b4c15a366c86f318d0c..6cf3db8d73a7fc851f8cbf6f04a42acb0a99ed6e 100644 (file)
@@ -46,7 +46,7 @@ ClientMap::ClientMap(
        m_control(control),
        m_camera_position(0,0,0),
        m_camera_direction(0,0,1),
-       m_camera_fov(PI)
+       m_camera_fov(M_PI)
 {
        m_camera_mutex.Init();
        assert(m_camera_mutex.IsInitialized());
index 86e929f617c72f3296f0d59280232600ac3b8d71..4767a65afea0b32fd449ddc3e15bc97dea4dc693 100644 (file)
@@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #ifndef CLIENTSERVER_HEADER
 #define CLIENTSERVER_HEADER
 
-#include "utility.h"
+#include "util/serialize.h"
 
 /*
        changes by PROTOCOL_VERSION:
index 6cb655f2f090834d7a9553148353ccc23b1f351a..4f5d095e5e034c2fa87200ab434e6a4e3bd233eb 100644 (file)
@@ -22,10 +22,22 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "serialization.h"
 #include "log.h"
 #include "porting.h"
+#include "util/serialize.h"
+#include "util/numeric.h"
+#include "util/string.h"
 
 namespace con
 {
 
+static u16 readPeerId(u8 *packetdata)
+{
+       return readU16(&packetdata[4]);
+}
+static u8 readChannel(u8 *packetdata)
+{
+       return readU8(&packetdata[6]);
+}
+
 BufferedPacket makePacket(Address &address, u8 *data, u32 datasize,
                u32 protocol_id, u16 sender_peer_id, u8 channel)
 {
index 51a98ed92ce7c2bd9a568f0cd21bbea5c286209a..e03c7983f77516bebf42dbc73322835dcbb006b5 100644 (file)
@@ -20,14 +20,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #ifndef CONNECTION_HEADER
 #define CONNECTION_HEADER
 
-#include <iostream>
-#include <fstream>
-#include "debug.h"
-#include "common_irrlicht.h"
+#include "irrlichttypes.h"
 #include "socket.h"
-#include "utility.h"
 #include "exceptions.h"
 #include "constants.h"
+#include "util/pointer.h"
+#include "util/container.h"
+#include "util/thread.h"
+#include <iostream>
+#include <fstream>
 
 namespace con
 {
@@ -107,15 +108,6 @@ public:
        {}
 };
 
-inline u16 readPeerId(u8 *packetdata)
-{
-       return readU16(&packetdata[4]);
-}
-inline u8 readChannel(u8 *packetdata)
-{
-       return readU8(&packetdata[6]);
-}
-
 #define SEQNUM_MAX 65535
 inline bool seqnum_higher(u16 higher, u16 lower)
 {
index a65ee6524aca0b4fdb4063d1adf0058b17282af7..97e94b361373d79b54a92837ee373c70e8943b37 100644 (file)
@@ -28,8 +28,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
     Some things here are legacy crap.
 */
 
-#define PI 3.14159
-
 /*
     Connection
 */
index cbcf66ef75d00798cdfc5c0dc44cce4a0c3ff526..c993f3f834e3f3f8720cbe1816ecb6917adbc7dd 100644 (file)
@@ -30,13 +30,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "clientobject.h"
 #include "content_object.h"
 #include "mesh.h"
-#include "utility.h" // For IntervalLimiter
 #include "itemdef.h"
 #include "tool.h"
 #include "content_cso.h"
 #include "sound.h"
 #include "nodedef.h"
 #include "localplayer.h"
+#include "util/numeric.h" // For IntervalLimiter
+#include "util/serialize.h"
+
 class Settings;
 struct ToolCapabilities;
 
@@ -935,7 +937,7 @@ public:
                        }
                }
                if(fabs(m_prop.automatic_rotate) > 0.001){
-                       m_yaw += dtime * m_prop.automatic_rotate * 180 / PI;
+                       m_yaw += dtime * m_prop.automatic_rotate * 180 / M_PI;
                        updateNodePos();
                }
        }
@@ -961,7 +963,7 @@ public:
                                else if(cam_to_entity.Y < -0.75)
                                        col += 4;
                                else{
-                                       float mob_dir = atan2(cam_to_entity.Z, cam_to_entity.X) / PI * 180.;
+                                       float mob_dir = atan2(cam_to_entity.Z, cam_to_entity.X) / M_PI * 180.;
                                        float dir = mob_dir - m_yaw;
                                        dir = wrapDegrees_180(dir);
                                        //infostream<<"id="<<m_id<<" dir="<<dir<<std::endl;
index 9d95e1758e9fd33220e1da9bd277a1a443bde5f7..ebf9fd59e88e4ac6747c2f6cb4f4acf0e5565894 100644 (file)
@@ -25,6 +25,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "nodedef.h"
 #include "tile.h"
 #include "gamedef.h"
+#include "util/numeric.h"
+#include "util/serialize.h"
+#include "util/directiontables.h"
 
 // Create a cuboid.
 //  collector - the MeshCollector for the resulting polygons
index cacd7c88f78a5f276f8abcf624a7ad33b8f91be8..6604b36a28a41f240d23d30338490a784f999c04 100644 (file)
@@ -22,7 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "irrlichttypes.h"
 #include "mapnode.h"
 #include "nodedef.h"
-#include "utility.h"
 #include "nameidmapping.h"
 #include <map>
 
index 676edfcf34408e0afe6311ec02d37e925b966f72..12c8aa42667d090a64d1932e5434d1579e5867b1 100644 (file)
@@ -20,7 +20,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "content_nodemeta.h"
 #include "inventory.h"
 #include "log.h"
-#include "utility.h"
+#include "util/serialize.h"
+#include "util/string.h"
+#include "constants.h" // MAP_BLOCKSIZE
 #include <sstream>
 
 #define NODEMETA_GENERIC 1
index 4d49b68d9ec9396a178ca548f5e034d808beb513..468a3911048065a1525f576ada941aa3ccfcb01d 100644 (file)
@@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "player.h"
 #include "scriptapi.h"
 #include "genericobject.h"
+#include "util/serialize.h"
 
 core::map<u16, ServerActiveObject::Factory> ServerActiveObject::m_types;
 
index 37fa63a005ecade3b82e5c6606e3a6e80986b576..ddb334fe29aa474e568c712f7a358da72eb5bb4f 100644 (file)
@@ -23,9 +23,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "log.h"
 #include <sstream>
 #include <set>
-#include "utility.h"
 #include "gamedef.h"
 #include "inventory.h"
+#include "util/serialize.h"
 
 // Check if input matches recipe
 // Takes recipe groups into account
index e7383fa18fcfec64523704c5ba3a970017ec88ac..710b62ee0e62058892c1d7449cce462290ec4f9d 100644 (file)
@@ -35,8 +35,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "player.h"
 #include "map.h"
 #include <ostream>
-#include "utility.h"
 #include "activeobject.h"
+#include "util/container.h"
+#include "util/numeric.h"
 
 class Server;
 class ServerEnvironment;
index 47e3465967f89869f18aa508f43261ef9ea96453..716c769aab4f05dca3775c8113c49974ed7fef97 100644 (file)
@@ -23,12 +23,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "clientserver.h"
 #include "log.h"
 #include "filesys.h"
-#include "utility.h"
 #include "hex.h"
 #include "sha1.h"
 #include <string>
 #include <iostream>
 #include <fstream>
+#include <sstream>
 
 bool FileCache::loadByPath(const std::string &path, std::ostream &os)
 {
index 188dc645a8f7a9faa99b697f95a9beb9280b1f7f..4ab031b5d2035f8e2052e1d63532006e8312e2d3 100644 (file)
@@ -18,8 +18,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include "genericobject.h"
-#include "utility.h"
 #include <sstream>
+#include "util/serialize.h"
 
 std::string gob_cmd_set_properties(const ObjectProperties &prop)
 {
index 1cad481e2e4b21e4b70d2e278cafbf285d6e9e22..0007290b1c26eaacaa25d7db4a9013f87e271db6 100644 (file)
@@ -22,7 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "common_irrlicht.h"
 #include "modalMenu.h"
-#include "utility.h"
 #include <string>
 
 struct ConfirmDest
index f4db287ee2f38fb2a924cbc9530240fc6ecb597c..a4c528b3ef091b19815f86c60c08dbab5fdd30fa 100644 (file)
@@ -27,8 +27,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <IGUIStaticText.h>
 #include <IGUIFont.h>
 #include <IGUIListBox.h>
-
 #include "gettext.h"
+#include "util/string.h"
 
 enum
 {
index 5942890475da936e8f3f364cabb74d9eedce6db6..6de8cdd4e158dc784b3cabf9c71a3e4ba28b9c71 100644 (file)
@@ -22,7 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "common_irrlicht.h"
 #include "modalMenu.h"
-#include "utility.h"
 #include <string>
 #include "subgame.h"
 
index 94639d06c89276a04dc59b63f0ec46a6772796cf..36adab617875ac26ab29e70711a9875f26625e48 100644 (file)
@@ -22,7 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "common_irrlicht.h"
 #include "modalMenu.h"
-#include "utility.h"
 #include <string>
 
 class IRespawnInitiator
index 8bae80a2e829cec2f7951b62eff2932fd95d10c7..f60c5b4552c985c63341a49bcb0c5a8f843e3917 100644 (file)
@@ -30,6 +30,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <IGUIFont.h>
 #include "log.h"
 #include "tile.h" // ITextureSource
+#include "util/string.h"
+#include "util/numeric.h"
 
 void drawItemStack(video::IVideoDriver *driver,
                gui::IGUIFont *font,
index 28335671e1b85e48d4c95d46b38e01f93c40f057..c49a345827d58439c992f76390a87f1c25cb3a15 100644 (file)
@@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "common_irrlicht.h"
 #include "inventory.h"
 #include "inventorymanager.h"
-#include "utility.h"
 #include "modalMenu.h"
 
 class IGameDef;
index 2bbbf4719ebc722e8c1de8edc917f5466f1cfe86..442c0882a022caf4e6bcb7a9fd097db6ccef0412 100644 (file)
@@ -23,7 +23,6 @@
 #define GUIKEYCHANGEMENU_HEADER
 
 #include "common_irrlicht.h"
-#include "utility.h"
 #include "modalMenu.h"
 #include "client.h"
 #include "gettext.h"
index 38ceaea91da41ba9c42e7c053ad3cc92c93ce302..8517d2723ce989625216c09a8c673f8176fb84a5 100644 (file)
@@ -36,9 +36,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 // For IGameCallback
 #include "guiPauseMenu.h"
 #include "gettext.h"
-#include "utility.h"
 #include "tile.h" // getTexturePath
 #include "filesys.h"
+#include "util/string.h"
 
 struct CreateWorldDestMainMenu : public CreateWorldDest
 {
index bc20cde45c494baf4373a76f78bcbf20a2cb303c..1be69c3b79fc7e892712f4740db8227a34585602 100644 (file)
@@ -22,7 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "common_irrlicht.h"
 #include "modalMenu.h"
-#include "utility.h"
 #include <string>
 
 class GUIMessageMenu : public GUIModalMenu
index 1748baadeafdedf010b65b0713046d8e1b1b48a0..3104840c5b356e1eba4de598408682603d3b9dfd 100644 (file)
@@ -21,7 +21,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 #include "common_irrlicht.h"
 #include "modalMenu.h"
-#include "utility.h"
 #include "client.h"
 #include <string>
 
index ffd1e746d45270713de05037f63cdda980148cb6..96fd7d67676b3b10fd517f9f9928119384d53db5 100644 (file)
@@ -28,8 +28,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <IGUIButton.h>\r
 #include <IGUIStaticText.h>\r
 #include <IGUIFont.h>\r
-\r
 #include "gettext.h"\r
+#include "util/string.h"\r
 \r
 GUIPauseMenu::GUIPauseMenu(gui::IGUIEnvironment* env,\r
                gui::IGUIElement* parent, s32 id,\r
index 730c2029446b7156ff46630a5ec53b304ca087af..2e2aff0f673a32bdd22d300f16a21f3880e64e75 100644 (file)
@@ -22,7 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "common_irrlicht.h"
 #include "modalMenu.h"
-#include "utility.h"
 #include <string>
 
 struct TextDest
index f4a4f280863133566fc4f6f6b7e1dfa201557fb8..0a0a29cd550f782d6276d208212bf011d0bb36df 100644 (file)
@@ -19,7 +19,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "inventory.h"
 #include "serialization.h"
-#include "utility.h"
 #include "debug.h"
 #include <sstream>
 #include "log.h"
@@ -27,6 +26,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "strfnd.h"
 #include "content_mapnode.h" // For loading legacy MaterialItems
 #include "nameidmapping.h" // For loading legacy MaterialItems
+#include "util/serialize.h"
+#include "util/string.h"
 
 /*
        ItemStack
index 91d43aee51deb3ac43cc828f1caf9a8b7c8291de..25257238b9bbe606b27dad049a49c15bf2cf12d6 100644 (file)
@@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "serverobject.h"
 #include "main.h"  // for g_settings
 #include "settings.h"
-#include "utility.h"
 #include "craftdef.h"
 
 #define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
index c8771c30c9f2fc85034ab4fec49c621b5d5f29bd..da33fd32295daae5fceb2c4e6c6f3d1159337ddd 100644 (file)
@@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "tile.h"
 #endif
 #include "log.h"
-#include "utility.h"
+#include "util/serialize.h"
 #include <map>
 #include <set>
 
index 3b5d15bae694c0951f5cfda290ca0d24842e743a..2bd62dabf6f70d65d8ce684506dc9a63d3592bba 100644 (file)
@@ -18,6 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include "localplayer.h"
+
 #include "main.h" // For g_settings
 #include "event.h"
 #include "collision.h"
@@ -25,6 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "nodedef.h"
 #include "settings.h"
 #include "map.h"
+#include "util/numeric.h"
 
 /*
        LocalPlayer
index 275b260290bda95e9f93a4a5b0c299d067999e9f..c6e010c45077eccd327f0f86b5a17422be4b72cc 100644 (file)
@@ -22,7 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "mapblock.h"
 #include "main.h"
 #include "filesys.h"
-#include "utility.h"
 #include "voxel.h"
 #include "porting.h"
 #include "mapgen.h"
@@ -32,6 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "profiler.h"
 #include "nodedef.h"
 #include "gamedef.h"
+#include "util/directiontables.h"
 
 #define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
 
index a6a4bee8ed6bd230d7176d3ff76fc45a03aefa3f..f51d57569394c6ff79f3baae9c42bc11771e77e6 100644 (file)
--- a/src/map.h
+++ b/src/map.h
@@ -26,12 +26,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <iostream>
 #include <sstream>
 
-#include "common_irrlicht.h"
+#include "irrlichttypes.h"
 #include "mapnode.h"
 #include "constants.h"
 #include "voxel.h"
-#include "utility.h" // Needed for UniqueQueue, a member of Map
 #include "modifiedstate.h"
+#include "util/container.h"
 
 extern "C" {
        #include "sqlite3.h"
index c4d3c422ea524ee088acba01b63144b58394163a..efe628a4e6fc3349c04a28b071489bdfdd280dd5 100644 (file)
@@ -34,6 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #ifndef SERVER
 #include "mapblock_mesh.h"
 #endif
+#include "util/string.h"
 
 #define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
 
@@ -409,7 +410,7 @@ void MapBlock::actuallyUpdateDayNightDiff()
 
 void MapBlock::expireDayNightDiff()
 {
-       INodeDefManager *nodemgr = m_gamedef->ndef();
+       //INodeDefManager *nodemgr = m_gamedef->ndef();
 
        if(data == NULL){
                m_day_night_differs = false;
@@ -976,7 +977,7 @@ void MapBlock::deSerialize_pre22(std::istream &is, u8 version, bool disk)
                                        ("MapBlock::deSerialize: no enough input data");
                is_underground = tmp;
                is.read((char*)*databuf_nodelist, nodecount * ser_length);
-               if(is.gcount() != nodecount * ser_length)
+               if((u32)is.gcount() != nodecount * ser_length)
                        throw SerializationError
                                        ("MapBlock::deSerialize: no enough input data");
        }
index 10ffc61ce181bb5c46b1b808fb8cd7079bf188f0..81e9502555e43912243f0038739ed63085b3a9ce 100644 (file)
@@ -34,6 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "nodemetadata.h"
 #include "nodetimer.h"
 #include "modifiedstate.h"
+#include "util/numeric.h" // getContainerPos
 
 class Map;
 class NodeMetadataList;
index a928b82ff764c24c4f3d2ca446affba3d28ac735..3f40f9c0046fb8acd851d5cfb326ff4a8765b789 100644 (file)
@@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "content_mapblock.h"
 #include "noise.h"
 #include "settings.h"
+#include "util/directiontables.h"
 
 /*
        MeshMakeData
index b983c857da00452dad5390d5c919211d57d110cb..1d4ef136ddd2c821e8d77e4bf81eed59d7fe36a1 100644 (file)
@@ -21,7 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #define MAPGEN_HEADER
 
 #include "common_irrlicht.h"
-#include "utility.h" // UniqueQueue
+#include "util/container.h" // UniqueQueue
 
 struct BlockMakeData;
 class MapBlock;
index 66c4d52e1b234f0d98d04517708d4e7fe01bfe52..2cffd3e4405fa4f6426d47dca916acb3216164dc 100644 (file)
@@ -20,11 +20,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "common_irrlicht.h"
 #include "mapnode.h"
 #include "porting.h"
-#include <string>
 #include "main.h" // For g_settings
 #include "nodedef.h"
 #include "content_mapnode.h" // For mapnode_translate_*_internal
 #include "serialization.h" // For ser_ver_supported
+#include "util/serialize.h"
+#include <string>
+#include <sstream>
 
 /*
        MapNode
index 7857ffda1065e0fd86e0afba9dd0d5889f767bb5..2a436f735af9b0895f655b316bbf3b407af4e596 100644 (file)
@@ -18,7 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include "nameidmapping.h"
-#include "utility.h"
+#include "util/serialize.h"
 
 void NameIdMapping::serialize(std::ostream &os) const
 {
index d0ce3c19d1fe7706f2a076d82c464100ff61a04f..80bfae3e7149c9e68138a0173150f96bd37bf434 100644 (file)
@@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "log.h"
 #include "settings.h"
 #include "nameidmapping.h"
+#include "util/serialize.h"
 
 /*
        NodeBox
index a376da30a7587f165a070d9b2f844824227fa89b..2f2bfe46eb17040febd839f7fc8d1ac9e0d8081e 100644 (file)
@@ -30,6 +30,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #endif
 #include "itemgroup.h"
 #include "sound.h" // SimpleSoundSpec
+#include "constants.h" // BS
+
 class IItemDefManager;
 class ITextureSource;
 class IGameDef;
index be36b9a864365f444d8302df8d81a237b5909120..141c779f14e176b40b8774c1e487c6abbdfde15c 100644 (file)
@@ -18,12 +18,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include "nodemetadata.h"
-#include "utility.h"
 #include "exceptions.h"
 #include "gamedef.h"
 #include "inventory.h"
-#include <sstream>
 #include "log.h"
+#include "util/serialize.h"
+#include "constants.h" // MAP_BLOCKSIZE
+#include <sstream>
 
 /*
        NodeMetadata
index 448f44eb0e272663b0e1072a3a739946a9f0b4fe..468c177fd30f3f719bd4de3ea9c562fe17af20d1 100644 (file)
@@ -18,8 +18,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include "nodetimer.h"
-#include "utility.h"
 #include "log.h"
+#include "util/serialize.h"
+#include "constants.h" // MAP_BLOCKSIZE
 
 /*
        NodeTimer
index f13e32d53954e76bdc820cd3db8a0da2251406a0..e67b78b520974667bb26c0de836e93e93b144132 100644 (file)
@@ -18,7 +18,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include "object_properties.h"
-#include "utility.h"
+#include "util/serialize.h"
+#include <sstream>
 
 #define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
 #define PP2(x) "("<<(x).X<<","<<(x).Y<<")"
index 2eb2b10ad3f2bef86327dba2624d6bf2323c74ff..d470fa6ff2dea8dd5a1ebec00d22d66e89f1fbe8 100644 (file)
@@ -19,11 +19,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "player.h"
 #include "constants.h"
-#include "utility.h"
 #include "gamedef.h"
 #include "connection.h" // PEER_ID_INEXISTENT
 #include "settings.h"
 #include "content_sao.h"
+#include "util/numeric.h"
 
 Player::Player(IGameDef *gamedef):
        touching_ground(false),
index 9264cc2ab6b6ad9721c05e4c2a5cd2da968104f3..dce7d57e266c82f62da5ae62e5557a92505a1507 100644 (file)
@@ -22,10 +22,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "common_irrlicht.h"
 #include <string>
-#include "utility.h"
 #include <jmutex.h>
 #include <jmutexautolock.h>
 #include <map>
+#include "util/timetaker.h"
+#include "util/numeric.h" // paging()
 
 /*
        Time profiler
index 32a834e5fa7e19cda3edb4f0e7a41f10a4d5ae6f..acd0d721f133fc24ccef52945900e34ac1623352 100644 (file)
@@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "quicktune.h"
 #include <jmutex.h>
 #include <jmutexautolock.h>
-#include "utility.h"
+#include "util/string.h"
 
 std::string QuicktuneValue::getString()
 {
index 138df04754fa8e0045890bae40de8f442ff3de95..2e3b5310bdb6fae4bf41635d1ad234ea35b1f194 100644 (file)
@@ -21,7 +21,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #define QVT_SHORTCUTTER_HEADER
 
 #include "quicktune.h"
-#include "utility.h"
 
 class QuicktuneShortcutter
 {
index 35f00b7b51791e531116b0d15983f7d75ddc9118..289ad31f874bee578f683583436037f4c6329fdf 100644 (file)
@@ -43,10 +43,10 @@ extern "C" {
 #include "nodemetadata.h"
 #include "mapblock.h" // For getNodeBlockPos
 #include "content_nodemeta.h"
-#include "utility.h"
 #include "tool.h"
 #include "daynightratio.h"
 #include "noise.h" // PseudoRandom for LuaPseudoRandom
+#include "util/pointedthing.h"
 
 static void stackDump(lua_State *L, std::ostream &o)
 {
index 64fd4f8ba5541481ede66085192673f336c3599d..28e3d81321898d701caa8312368391899b940038 100644 (file)
@@ -18,7 +18,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include "serialization.h"
-#include "utility.h"
+
+#include "util/serialize.h"
 #ifdef _WIN32
        #define ZLIB_WINAPI
 #endif
index 9eebe3cb7b4c719a81bef8681195a609a47f5c75..24648c1fc83dc5f9535adbdb26c2377652da9374 100644 (file)
@@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "common_irrlicht.h"
 #include "exceptions.h"
 #include <iostream>
-#include "utility.h"
+#include "util/pointer.h"
 
 /*
        Map format serialization version
index 70e33aaf73db660745142dedfded79d9dfed0861..f8eaaf9c3952d8f6e69f8c4d74d19a856ff55ae4 100644 (file)
@@ -18,7 +18,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include "server.h"
-#include "utility.h"
 #include <iostream>
 #include <queue>
 #include "clientserver.h"
@@ -49,10 +48,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "sha1.h"
 #include "base64.h"
 #include "tool.h"
-#include "util/string.h"
 #include "sound.h" // dummySoundManager
 #include "event_manager.h"
 #include "hex.h"
+#include "util/string.h"
+#include "util/pointedthing.h"
 
 #define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
 
@@ -676,7 +676,7 @@ void RemoteClient::GetNextBlocks(Server *server, float dtime,
                                FOV setting. The default of 72 degrees is fine.
                        */
 
-                       float camera_fov = (72.0*PI/180) * 4./3.;
+                       float camera_fov = (72.0*M_PI/180) * 4./3.;
                        if(isBlockInSight(p, camera_pos, camera_dir, camera_fov, 10000*BS) == false)
                        {
                                continue;
index 676b40f9639453167875714c82c0ea2f07f44cf2..18c223ec7c0a4cd12df02843ee06e13df6d7b814 100644 (file)
@@ -22,7 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "connection.h"
 #include "environment.h"
-#include "common_irrlicht.h"
+#include "irrlichttypes.h"
 #include <string>
 #include "porting.h"
 #include "map.h"
@@ -34,6 +34,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "inventorymanager.h"
 #include "subgame.h"
 #include "sound.h"
+#include "util/thread.h"
+#include "util/string.h"
+
 struct LuaState;
 typedef struct lua_State lua_State;
 class IWritableItemDefManager;
index cf89f7f5635dffd4e9f6a8d34faf96e19469b8a5..fc2f22083268cc04f305c1ed11caf6a10ecba523 100644 (file)
@@ -17,7 +17,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */
 
 #include "servercommand.h"
-#include "utility.h"
 #include "settings.h"
 #include "main.h" // For g_settings
 #include "content_sao.h"
index a648db7dae80f8e595998477bd7638688ad5a47b..deaa94f2c365e61a54b587a023cb3a47fe065c6a 100644 (file)
@@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "serverobject.h"
 #include <fstream>
 #include "inventory.h"
+#include "constants.h" // BS
 
 ServerActiveObject::ServerActiveObject(ServerEnvironment *env, v3f pos):
        ActiveObject(0),
@@ -66,6 +67,11 @@ void ServerActiveObject::registerType(u16 type, Factory f)
        m_types.insert(type, f);
 }
 
+float ServerActiveObject::getMinimumSavedMovement()
+{
+       return 2.0*BS;
+}
+
 ItemStack ServerActiveObject::getWieldedItem() const
 {
        const Inventory *inv = getInventory();
index 635160a03f3f7f808bb83f13d970afe7a276cfe0..0130ca1bf4f40a34bea3799d787d9bc2a4d01155 100644 (file)
@@ -22,9 +22,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "irrlichttypes.h"
 #include "activeobject.h"
-#include "utility.h"
 #include "inventorymanager.h"
 #include "itemgroup.h"
+#include "util/container.h"
 
 /*
 
@@ -96,8 +96,7 @@ public:
                { setBasePosition(pos); }
        // If object has moved less than this and data has not changed,
        // saving to disk may be omitted
-       virtual float getMinimumSavedMovement()
-               { return 2.0*BS; }
+       virtual float getMinimumSavedMovement();
        
        virtual bool isPeaceful(){return true;}
 
index d75b0bec19616d7498ddeb4221b2bee4bbf5fac2..16bac8eec36e83e8cf9a8165d672d5bcd40f4479 100644 (file)
@@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #ifndef SETTINGS_HEADER
 #define SETTINGS_HEADER
 
-#include "common_irrlicht.h"
+#include "irrlichttypes.h"
 #include <string>
 #include <jthread.h>
 #include <jmutex.h>
@@ -30,8 +30,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <fstream>
 #include <sstream>
 #include "debug.h"
-#include "utility.h"
 #include "log.h"
+#include "util/string.h"
 
 enum ValueType
 {
index 76dcac8b7fcd68ba4eb998b3ca0a44e95f6dea6f..22b12ca1ba6c687c57dc4a3e1c3870dd5f0a4918 100644 (file)
@@ -3,11 +3,11 @@
 #include "ISceneManager.h"
 #include "ICameraSceneNode.h"
 #include "S3DVertex.h"
-#include "utility.h" // MYMIN
 #include "tile.h" // getTexturePath
 #include "noise.h" // easeCurve
 #include "main.h" // g_profiler
 #include "profiler.h"
+#include "util/numeric.h" // MYMIN
 
 //! constructor
 Sky::Sky(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id):
index ef339c4867dd8198b1cfd20f928416a86da3b64f..f8afed229add6f4093c72ea66684a2e6a6a182a3 100644 (file)
@@ -50,7 +50,8 @@ typedef int socket_t;
 #include <iostream>
 #include <stdlib.h>
 #include <errno.h>
-#include "utility.h"
+#include "util/string.h"
+#include "util/numeric.h"
 
 bool socket_enable_debug_output = false;
 #define DP socket_enable_debug_output
index e95b31b7f4dcf72c500cec59ad61532ad5b2b3d1..d2f7276a6ca3b74bb16796dd7d705783533e0ddf 100644 (file)
@@ -38,8 +38,10 @@ with this program; ifnot, write to the Free Software Foundation, Inc.,
 #endif
 #include <vorbis/vorbisfile.h>
 #include "log.h"
-#include "utility.h" // myrand()
 #include "filesys.h"
+#include "util/numeric.h" // myrand()
+#include "debug.h" // assert()
+#include "porting.h"
 #include <map>
 #include <vector>
 #include <fstream>
index d522e2ad7cc72d032eeee2c77010266ddd0fd59a..a55471b7f8753bc73ce9ed15baaf2b3f12974730 100644 (file)
@@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "common_irrlicht.h"
 #include <string>
 #include <sstream>
-#include "utility.h"
+#include "util/serialize.h"
 
 struct StaticObject
 {
index 95b20406494a812b15839377076e70cbb0623a50..63aa09c0b136ea894188cc88614587d6a14895cf 100644 (file)
@@ -25,7 +25,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "main.h"
 #include "socket.h"
 #include "connection.h"
-#include "utility.h"
 #include "serialization.h"
 #include "voxel.h"
 #include <sstream>
@@ -38,6 +37,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "util/string.h"
 #include "voxelalgorithms.h"
 #include "inventory.h"
+#include "util/numeric.h"
+#include "util/serialize.h"
 
 /*
        Asserts that the exception occurs
index 919298fab8d73a2574b0c063f16d9aa966a05a2c..731f3712cdc78f8cbd112c859908b726f35f6ad2 100644 (file)
@@ -21,7 +21,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "debug.h"
 #include "main.h" // for g_settings
 #include "filesys.h"
-#include "utility.h"
 #include "settings.h"
 #include "mesh.h"
 #include <ICameraSceneNode.h>
@@ -30,6 +29,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "nodedef.h" // For texture atlas making
 #include "gamedef.h"
 #include "util/string.h"
+#include "util/container.h"
+#include "util/thread.h"
+#include "util/numeric.h"
 
 /*
        A cache from texture name to texture path
index 8b19b4c32e3ee55106ef0a8415732f6509d8a58b..a6609a3a612ad3594f4a7fb206c387dc166a093e 100644 (file)
@@ -22,7 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "common_irrlicht.h"
 #include "threads.h"
-#include "utility.h"
 #include <string>
 
 class IGameDef;
@@ -205,11 +204,6 @@ struct TileSpec
        // Sets everything else except the texture in the material
        void applyMaterialOptions(video::SMaterial &material) const
        {
-               if(alpha != 255 && material_type != MATERIAL_ALPHA_VERTEX)
-                       dstream<<"WARNING: TileSpec: alpha != 255 "
-                                       "but not MATERIAL_ALPHA_VERTEX"
-                                       <<std::endl;
-
                if(material_type == MATERIAL_ALPHA_NONE)
                        material.MaterialType = video::EMT_SOLID;
                else if(material_type == MATERIAL_ALPHA_VERTEX)
@@ -230,7 +224,7 @@ struct TileSpec
        }
        
        AtlasPointer texture;
-       // Vertex alpha
+       // Vertex alpha (when MATERIAL_ALPHA_VERTEX is used)
        u8 alpha;
        // Material parameters
        u8 material_type;
index 3fb50420e9f672a4d443dd2949d79db34e5ca69e..c1e268ff11c9ff4f512a3a865924de90e92bba74 100644 (file)
@@ -18,10 +18,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include "tool.h"
-#include "utility.h"
 #include "itemdef.h" // For itemgroup_get()
 #include "log.h"
 #include "inventory.h"
+#include "util/serialize.h"
+#include "util/numeric.h"
 
 void ToolCapabilities::serialize(std::ostream &os) const
 {
diff --git a/src/utility.cpp b/src/utility.cpp
deleted file mode 100644 (file)
index 66127fc..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Minetest-c55
-Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-
diff --git a/src/utility.h b/src/utility.h
deleted file mode 100644 (file)
index 58e75ce..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-Minetest-c55
-Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#ifndef UTILITY_HEADER
-#define UTILITY_HEADER
-
-// Headers whose content was previously here
-#include "util/serialize.h"
-#include "util/directiontables.h"
-#include "util/pointer.h"
-#include "util/string.h"
-#include "util/container.h"
-#include "util/thread.h"
-#include "util/numeric.h"
-#include "util/timetaker.h"
-#include "util/pointedthing.h"
-
-#endif
-
index c8482939ee3855f5af1e7846c358b219577f859e..8fdae79e1590702935eb739a4d8aae78c7eba301 100644 (file)
@@ -19,9 +19,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "voxel.h"
 #include "map.h"
-#include "utility.h" // For TimeTaker
 #include "gettime.h"
 #include "nodedef.h"
+#include "util/timetaker.h"
 
 /*
        Debug stuff