From 1ea2b380cae60663256ddafcb94c6b614c4624da Mon Sep 17 00:00:00 2001 From: Allan Ference Date: Fri, 9 Aug 2013 17:35:56 +0200 Subject: [PATCH] Disregard progressbar --- src/client/map.h | 4 ++-- src/client/mapio.cpp | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/client/map.h b/src/client/map.h index 1930a392..4022911d 100644 --- a/src/client/map.h +++ b/src/client/map.h @@ -144,8 +144,8 @@ public: bool loadOtcm(const std::string& fileName); void saveOtcm(const std::string& fileName); - void loadOtbm(const std::string& fileName, const UIWidgetPtr& pbar = 0); - void saveOtbm(const std::string& fileName, const UIWidgetPtr& pbar = 0); + void loadOtbm(const std::string& fileName); + void saveOtbm(const std::string& fileName); // otbm attributes (description, size, etc.) void setHouseFile(const std::string& file) { m_attribs.set(OTBM_ATTR_HOUSE_FILE, file); } diff --git a/src/client/mapio.cpp b/src/client/mapio.cpp index 1eb16bd5..486992f9 100644 --- a/src/client/mapio.cpp +++ b/src/client/mapio.cpp @@ -32,7 +32,7 @@ #include #include -void Map::loadOtbm(const std::string& fileName, const UIWidgetPtr& pbar) +void Map::loadOtbm(const std::string& fileName) { FileStreamPtr fin = g_resources.openFile(fileName); if(!fin) @@ -94,7 +94,6 @@ void Map::loadOtbm(const std::string& fileName, const UIWidgetPtr& pbar) for(const BinaryTreePtr& nodeMapData : node->getChildren()) { uint8 mapDataType = nodeMapData->getU8(); if(mapDataType == OTBM_TILE_AREA) { - Position basePos; basePos.x = nodeMapData->getU16(); basePos.y = nodeMapData->getU16(); @@ -121,7 +120,7 @@ void Map::loadOtbm(const std::string& fileName, const UIWidgetPtr& pbar) while(nodeTile->canRead()) { uint8 tileAttr = nodeTile->getU8(); - switch (tileAttr) { + switch(tileAttr) { case OTBM_ATTR_TILE_FLAGS: { uint32 _flags = nodeTile->getU32(); if((_flags & TILESTATE_PROTECTIONZONE) == TILESTATE_PROTECTIONZONE) @@ -180,7 +179,6 @@ void Map::loadOtbm(const std::string& fileName, const UIWidgetPtr& pbar) if(house) tile->setHouseId(house->getId()); tile->setFlags((tileflags_t)flags); - //if(!(++pbarvalue % 8192) && pbar); } } } else if(mapDataType == OTBM_TOWNS) { @@ -224,7 +222,7 @@ void Map::loadOtbm(const std::string& fileName, const UIWidgetPtr& pbar) fin->close(); } -void Map::saveOtbm(const std::string& fileName, const UIWidgetPtr&/* pbar*/) +void Map::saveOtbm(const std::string& fileName) { FileStreamPtr fin = g_resources.createFile(fileName); if(!fin)