aboutsummaryrefslogtreecommitdiff
path: root/cmake
Commit message (Expand)AuthorAge
* Fix cmake library default build problem since moving to lib/Loic Blot2017-04-07
* Update embedded jsoncpp from unk version to 0.10.6 + move libs to lib/ instea...Loïc Blot2017-04-02
* Fixes for compiling with a newer (system) jsoncpp (#4429)Rogier-52016-08-10
* Really fix ncurses lookup on Arch Linuxsfan52016-05-16
* Fix ncurses lookup on Arch LinuxDavid Knapp2016-04-08
* Improve LuaJIT detectionFerdinand Thiessen2015-12-05
* Add server side ncurses terminalest312015-11-06
* FindJson: use PATH_SUFFIXES jsoncpp to find incdirIgor Gnatenko2015-09-26
* Add LibGMPest312015-05-11
* Make Git version detection use VERSION_STRING instead of tagsShadowNinja2015-05-05
* Better version detection for shallow clonesest312015-05-03
* Fix typo in OpenGL ES 2 CMake fileShadowNinja2015-03-27
* Clean up and tweak build systemShadowNinja2015-03-27
* Fix cmake po detection bugest312015-03-23
* Improve FindIrrlicht.cmake moduleMarkus Koschany2015-02-21
* Remove included SQLite3ShadowNinja2015-01-08
* OS X compatibility fixesMartin Doege2014-06-29
* Add CURL_DLL search to show up CURL_DLL in cmake gui and don't silently ignor...sapier2013-11-17
* Show git hash in version string at top left corner of windowKahrl2013-09-28
* Always use builtin JThread librarykwolekr2013-09-15
* build with ogles2 driverproller2013-03-16
* fix link if system json lib existsproller2013-03-05
* new auto masterserverproller2013-02-22
* Prefer shared cURL library instead of the static one.Ilya Zhuravlev2012-12-21
* Tweak CMake files for cURLsfan52012-12-18
* Added ability to fetch media from remote server (using cURL library)Ilya Zhuravlev2012-12-16
* Add OGG_INCLUDE_DIR to SOUND_INCLUDE_DIRSPerttu Ahola2012-03-25
* celeron55's sound system initial frameworkPerttu Ahola2012-03-24
* Flatten share/ and user/ in the source and for the RUN_IN_PLACE buildPerttu Ahola2012-03-20
* Gettext fix for *BSD - require special linkage as glibc is not usedq662011-08-11
* Locale dir should be parallel to global data dirGiuseppe Bilotta2011-07-24
* Bring po update out of cmake againGiuseppe Bilotta2011-07-24
* updated cmakerules to autodetect if gettext can be usedConstantin Wenger2011-07-23
* updatepo cmake ruleGiuseppe Bilotta2011-07-22
* Refactor mo creation/installationGiuseppe Bilotta2011-07-22
* fixed not finding dll for gettext in MSVCConstantin Wenger2011-07-21
* Find correct library for MSVC vs MingW in WinowsGiuseppe Bilotta2011-07-21
* updated some path because the dlls are mostly under bin not libConstantin Wenger2011-07-21
* Refactor and clean up gettext managementGiuseppe Bilotta2011-07-21
* Use system sqlite3/jthread libs if availableGiuseppe Bilotta2011-07-20
* Added libIrrlicht.dll.a to searched library names for non-MSVC windowsPerttu Ahola2011-05-17
* forgot some test code in...Perttu Ahola2011-02-16
* Hopefully fixed some of the errors in cmake's finding of irrlichtPerttu Ahola2011-02-16
* might work good on cmake+msvc nowPerttu Ahola2011-02-15
* Hopefully fixed the problem of IRRLICHT_SOURCE_DIR being not considered when ...Perttu Ahola2011-02-01
* Mainly small build system fixesPerttu Ahola2011-01-09
* CMake stuff works now on linux and windows... and should be possible to make ...Perttu Ahola2011-01-08
* CMake working on Linux (not on windows)Perttu Ahola2011-01-08
td::map<s16, MapBlock*>::iterator n = m_blocks.find(y); if(n == m_blocks.end()) { block = NULL; } // If block exists, return it else{ block = n->second; } // Cache the last result m_block_cache_y = y; m_block_cache = block; return block; } MapBlock * MapSector::getBlockNoCreateNoEx(s16 y) { return getBlockBuffered(y); } MapBlock * MapSector::createBlankBlockNoInsert(s16 y) { assert(getBlockBuffered(y) == NULL); v3s16 blockpos_map(m_pos.X, y, m_pos.Y); MapBlock *block = new MapBlock(m_parent, blockpos_map, m_gamedef); return block; } MapBlock * MapSector::createBlankBlock(s16 y) { MapBlock *block = createBlankBlockNoInsert(y); m_blocks[y] = block; return block; } void MapSector::insertBlock(MapBlock *block) { s16 block_y = block->getPos().Y; MapBlock *block2 = getBlockBuffered(block_y); if(block2 != NULL){ throw AlreadyExistsException("Block already exists"); } v2s16 p2d(block->getPos().X, block->getPos().Z); assert(p2d == m_pos); // Insert into container m_blocks[block_y] = block; } void MapSector::deleteBlock(MapBlock *block) { s16 block_y = block->getPos().Y; // Clear from cache m_block_cache = NULL; // Remove from container m_blocks.erase(block_y); // Delete delete block; } void MapSector::getBlocks(std::list<MapBlock*> &dest) { for(std::map<s16, MapBlock*>::iterator bi = m_blocks.begin(); bi != m_blocks.end(); ++bi) { dest.push_back(bi->second); } } /* ServerMapSector */ ServerMapSector::ServerMapSector(Map *parent, v2s16 pos, IGameDef *gamedef): MapSector(parent, pos, gamedef) { } ServerMapSector::~ServerMapSector() { } void ServerMapSector::serialize(std::ostream &os, u8 version) { if(!ser_ver_supported(version)) throw VersionMismatchException("ERROR: MapSector format not supported"); /* [0] u8 serialization version + heightmap data */ // Server has both of these, no need to support not having them. //assert(m_objects != NULL); // Write version os.write((char*)&version, 1); /* Add stuff here, if needed */ } ServerMapSector* ServerMapSector::deSerialize( std::istream &is, Map *parent, v2s16 p2d, std::map<v2s16, MapSector*> & sectors, IGameDef *gamedef ) { /* [0] u8 serialization version + heightmap data */ /* Read stuff */ // Read version u8 version = SER_FMT_VER_INVALID; is.read((char*)&version, 1); if(!ser_ver_supported(version)) throw VersionMismatchException("ERROR: MapSector format not supported"); /* Add necessary reading stuff here */ /* Get or create sector */ ServerMapSector *sector = NULL; std::map<v2s16, MapSector*>::iterator n = sectors.find(p2d); if(n != sectors.end()) { dstream<<"WARNING: deSerializing existent sectors not supported " "at the moment, because code hasn't been tested." <<std::endl; MapSector *sector = n->second; assert(sector->getId() == MAPSECTOR_SERVER); return (ServerMapSector*)sector; } else { sector = new ServerMapSector(parent, p2d, gamedef); sectors[p2d] = sector; } /* Set stuff in sector */ // Nothing here return sector; } #ifndef SERVER /* ClientMapSector */ ClientMapSector::ClientMapSector(Map *parent, v2s16 pos, IGameDef *gamedef): MapSector(parent, pos, gamedef) { } ClientMapSector::~ClientMapSector() { } #endif // !SERVER //END