MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / updateTilePointers

Function updateTilePointers

src/OpenLoco/src/Map/TileManager.cpp:634–654  ·  view source on GitHub ↗

0x00461348

Source from the content-addressed store, hash-verified

632
633 // 0x00461348
634 void updateTilePointers()
635 {
636 clearTilePointers();
637
638 auto el = _elements.begin();
639 for (tile_coord_t y = 0; y < kMapRows; y++)
640 {
641 for (tile_coord_t x = 0; x < kMapColumns; x++)
642 {
643 set(TilePos2(x, y), &*el);
644
645 // Skip remaining elements on this tile
646 do
647 {
648 el++;
649 } while (!(el - 1)->isLast());
650 }
651 }
652
653 _elementsEnd = std::distance(_elements.begin(), el);
654 }
655
656 // 0x0046148F
657 void reorganise()

Callers 3

initialiseFunction · 0.85
setElementsFunction · 0.85
reorganiseFunction · 0.85

Calls 4

clearTilePointersFunction · 0.85
setFunction · 0.85
beginMethod · 0.45
isLastMethod · 0.45

Tested by

no test coverage detected