aboutsummaryrefslogtreecommitdiff
path: root/src/minimap.h
Commit message (Expand)AuthorAge
* VoxelManip cleanups (const ref, const move) + function removal (#6169)Loïc Blot2017-07-26
* Isolate irrlicht references and use a singleton (#6041)Loïc Blot2017-06-26
* Cpp11 patchset 11: continue working on constructor style migration (#6004)Loïc Blot2017-06-18
* Use C++11 mutexes only (remove compat code) (#5922)Loïc Blot2017-06-06
* [CSM] Add function to set minimap shape (#5569)bigfoot5472017-04-14
* [CSM] Add minimap API modifiers (#5399)Loïc Blot2017-03-16
* Minimap: Optimisenumber Zero2017-03-11
* Add hardware node coloring. Includes:Dániel Juhász2017-01-23
* Minimap: show player markersRealBadAngel2016-02-19
* Clean up threadingShadowNinja2015-08-23
* Misc. minor fixeskwolekr2015-07-10
* Clean-up Minimap codekwolekr2015-07-08
* Make m_blocks_cache privateest312015-06-30
* Add UpdateThread and use it for minimap and mesh threadsest312015-06-29
* Bugfix: minimap was updated only with loading new blocks, allow forced update...RealBadAngel2015-06-28
* Minimap updateRealBadAngel2015-06-28
* Remove busy polling inside minimap threadest312015-06-27
* Add minimap featureRealBadAngel2015-06-27
>} void StaticObject::deSerialize(std::istream &is, u8 version) { // type type = readU8(is); // pos pos = readV3F1000(is); // data data = deSerializeString(is); } void StaticObjectList::serialize(std::ostream &os) { // version u8 version = 0; writeU8(os, version); // count size_t count = m_stored.size() + m_active.size(); // Make sure it fits into u16, else it would get truncated and cause e.g. // issue #2610 (Invalid block data in database: unsupported NameIdMapping version). if (count > U16_MAX) { errorstream << "StaticObjectList::serialize(): " << "too many objects (" << count << ") in list, " << "not writing them to disk." << std::endl; writeU16(os, 0); // count = 0 return; } writeU16(os, count); for(std::vector<StaticObject>::iterator i = m_stored.begin(); i != m_stored.end(); ++i) { StaticObject &s_obj = *i; s_obj.serialize(os); } for(std::map<u16, StaticObject>::iterator i = m_active.begin(); i != m_active.end(); ++i) { StaticObject s_obj = i->second; s_obj.serialize(os); } } void StaticObjectList::deSerialize(std::istream &is) { // version u8 version = readU8(is); // count u16 count = readU16(is); for(u16 i = 0; i < count; i++) { StaticObject s_obj; s_obj.deSerialize(is, version); m_stored.push_back(s_obj); } }