MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / writeTileSector

Method writeTileSector

source/game/StarWorldStorage.cpp:528–538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

526}
527
528ByteArray WorldStorage::writeTileSector(TileSectorStore const& store) {
529 DataStreamBuffer ds;
530 ds.vuwrite(store.generationLevel);
531 ds.vuwrite(store.tileSerializationVersion);
532 starAssert(store.tiles);
533 for (size_t y = 0; y < WorldSectorSize; ++y) {
534 for (size_t x = 0; x < WorldSectorSize; ++x)
535 (*store.tiles)(x, y).write(ds);
536 }
537 return compressData(ds.takeData());
538}
539
540ByteArray WorldStorage::uniqueIndexKey(String const& uniqueId) {
541 DataStreamBuffer ds(5);

Callers

nothing calls this directly

Calls 4

compressDataFunction · 0.85
vuwriteMethod · 0.80
writeMethod · 0.45
takeDataMethod · 0.45

Tested by

no test coverage detected