#include "stdafx.h" #include "CBuildingHandler.h" void CBuildingHandler::loadBuildings() { std::ifstream inp("H3bitmap.lod\\BUILDING.TXT", std::ios::in | std::ios::binary); inp.seekg(0,std::ios::end); // na koniec int andame = inp.tellg(); // read length inp.seekg(0,std::ios::beg); // wracamy na poczatek char * bufor = new char[andame]; // allocate memory inp.read((char*)bufor, andame); // read map file to buffer inp.close(); std::string buf = std::string(bufor); delete [andame] bufor; int i=0; //buf iterator int hmcr=0; for(i; i200 && buf.substr(i, buf.size()-i).find('\r')==std::string::npos) break; std::string firstStr; int befi=i; for(i; i