MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / Structure_Add

Method Structure_Add

Source/Map/Map.cpp:123–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void cMap::Structure_Add(const sStructure& pStructure, size_t pTileX, size_t pTileY) {
124
125 for (const auto& Piece : pStructure.mTiles) {
126 Tile_Set(pTileX + Piece.mX, pTileY + Piece.mY, Piece.mTileID);
127 }
128
129 // Add the sprites
130 for (const auto& Sprite : pStructure.mSprites) {
131 auto Sheet = &mSpriteSheetTypes_InGame_Amiga[Sprite.mSpriteID][0];
132
133 // - 0x40 because no sidebar
134 Sprite_Add(Sprite.mSpriteID, ((pTileX) * 16) + (Sprite.mX - Sheet->mModX),
135 ((pTileY) * 16) + (Sprite.mY - Sheet->mModY));
136 }
137}
138
139void cMap::ClearTiles(const size_t pTileID) {
140

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected