MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / ObjChangeMapResync

Function ObjChangeMapResync

Source/objects.cpp:4436–4456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4434}
4435
4436void ObjChangeMapResync(int x1, int y1, int x2, int y2)
4437{
4438 for (int j = y1; j <= y2; j++) {
4439 for (int i = x1; i <= x2; i++) {
4440 ObjSetMini({ i, j }, pdungeon[i][j]);
4441 dungeon[i][j] = pdungeon[i][j];
4442 }
4443 }
4444
4445 WorldTilePosition mega1 { static_cast<WorldTileCoord>(x1), static_cast<WorldTileCoord>(y1) };
4446 WorldTilePosition mega2 { static_cast<WorldTileCoord>(x2), static_cast<WorldTileCoord>(y2) };
4447 WorldTilePosition world1 = mega1.megaToWorld();
4448 WorldTilePosition world2 = mega2.megaToWorld() + Displacement { 1, 1 };
4449 if (leveltype == DTYPE_CATHEDRAL) {
4450 ObjL1Special(world1.x, world1.y, world2.x, world2.y);
4451 }
4452 if (leveltype == DTYPE_CATACOMBS) {
4453 ObjL2Special(world1.x, world1.y, world2.x, world2.y);
4454 }
4455 ResyncDoors(world1, world2, false);
4456}
4457
4458_item_indexes ItemMiscIdIdx(item_misc_id imiscid)
4459{

Callers 5

OperateChamberOfBoneBookFunction · 0.85
SyncQSTLeverFunction · 0.85
SyncPedestalFunction · 0.85
ResyncQuestsFunction · 0.85
LazarusAiFunction · 0.85

Calls 5

ObjSetMiniFunction · 0.85
ObjL1SpecialFunction · 0.85
ObjL2SpecialFunction · 0.85
ResyncDoorsFunction · 0.85
megaToWorldMethod · 0.80

Tested by

no test coverage detected