Disregard progressbar
This commit is contained in:
parent
914fe249ab
commit
1ea2b380ca
|
@ -144,8 +144,8 @@ public:
|
||||||
bool loadOtcm(const std::string& fileName);
|
bool loadOtcm(const std::string& fileName);
|
||||||
void saveOtcm(const std::string& fileName);
|
void saveOtcm(const std::string& fileName);
|
||||||
|
|
||||||
void loadOtbm(const std::string& fileName, const UIWidgetPtr& pbar = 0);
|
void loadOtbm(const std::string& fileName);
|
||||||
void saveOtbm(const std::string& fileName, const UIWidgetPtr& pbar = 0);
|
void saveOtbm(const std::string& fileName);
|
||||||
|
|
||||||
// otbm attributes (description, size, etc.)
|
// otbm attributes (description, size, etc.)
|
||||||
void setHouseFile(const std::string& file) { m_attribs.set(OTBM_ATTR_HOUSE_FILE, file); }
|
void setHouseFile(const std::string& file) { m_attribs.set(OTBM_ATTR_HOUSE_FILE, file); }
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <framework/xml/tinyxml.h>
|
#include <framework/xml/tinyxml.h>
|
||||||
#include <framework/ui/uiwidget.h>
|
#include <framework/ui/uiwidget.h>
|
||||||
|
|
||||||
void Map::loadOtbm(const std::string& fileName, const UIWidgetPtr& pbar)
|
void Map::loadOtbm(const std::string& fileName)
|
||||||
{
|
{
|
||||||
FileStreamPtr fin = g_resources.openFile(fileName);
|
FileStreamPtr fin = g_resources.openFile(fileName);
|
||||||
if(!fin)
|
if(!fin)
|
||||||
|
@ -94,7 +94,6 @@ void Map::loadOtbm(const std::string& fileName, const UIWidgetPtr& pbar)
|
||||||
for(const BinaryTreePtr& nodeMapData : node->getChildren()) {
|
for(const BinaryTreePtr& nodeMapData : node->getChildren()) {
|
||||||
uint8 mapDataType = nodeMapData->getU8();
|
uint8 mapDataType = nodeMapData->getU8();
|
||||||
if(mapDataType == OTBM_TILE_AREA) {
|
if(mapDataType == OTBM_TILE_AREA) {
|
||||||
|
|
||||||
Position basePos;
|
Position basePos;
|
||||||
basePos.x = nodeMapData->getU16();
|
basePos.x = nodeMapData->getU16();
|
||||||
basePos.y = nodeMapData->getU16();
|
basePos.y = nodeMapData->getU16();
|
||||||
|
@ -180,7 +179,6 @@ void Map::loadOtbm(const std::string& fileName, const UIWidgetPtr& pbar)
|
||||||
if(house)
|
if(house)
|
||||||
tile->setHouseId(house->getId());
|
tile->setHouseId(house->getId());
|
||||||
tile->setFlags((tileflags_t)flags);
|
tile->setFlags((tileflags_t)flags);
|
||||||
//if(!(++pbarvalue % 8192) && pbar);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(mapDataType == OTBM_TOWNS) {
|
} else if(mapDataType == OTBM_TOWNS) {
|
||||||
|
@ -224,7 +222,7 @@ void Map::loadOtbm(const std::string& fileName, const UIWidgetPtr& pbar)
|
||||||
fin->close();
|
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);
|
FileStreamPtr fin = g_resources.createFile(fileName);
|
||||||
if(!fin)
|
if(!fin)
|
||||||
|
|
Loading…
Reference in New Issue