CDefObjInfoHandler.cpp 589 B

12345678910111213141516171819202122232425262728
  1. #include "stdafx.h"
  2. #include "CDefObjInfoHandler.h"
  3. bool DefObjInfo::operator==(const std::string & por) const
  4. {
  5. return this->defName == por;
  6. }
  7. void CDefObjInfoHandler::load()
  8. {
  9. std::ifstream inp("H3bitmap.lod\\ZOBJCTS.TXT", std::ios::in | std::ios::binary);
  10. int objNumber;
  11. inp>>objNumber;
  12. for(int hh=0; hh<objNumber; ++hh)
  13. {
  14. DefObjInfo nobj;
  15. std::string dump;
  16. inp>>nobj.defName;
  17. for(int yy=0; yy<4; ++yy)
  18. inp>>dump;
  19. inp>>nobj.type;
  20. inp>>nobj.subtype;
  21. inp>>nobj.objType;
  22. inp>>nobj.priority;
  23. objs.push_back(nobj);
  24. }
  25. inp.close();
  26. }