| 4404 | } |
| 4405 | |
| 4406 | void ObjChangeMap(int x1, int y1, int x2, int y2) |
| 4407 | { |
| 4408 | for (int j = y1; j <= y2; j++) { |
| 4409 | for (int i = x1; i <= x2; i++) { |
| 4410 | ObjSetMini({ i, j }, pdungeon[i][j]); |
| 4411 | dungeon[i][j] = pdungeon[i][j]; |
| 4412 | } |
| 4413 | } |
| 4414 | |
| 4415 | WorldTilePosition mega1 { static_cast<WorldTileCoord>(x1), static_cast<WorldTileCoord>(y1) }; |
| 4416 | WorldTilePosition mega2 { static_cast<WorldTileCoord>(x2), static_cast<WorldTileCoord>(y2) }; |
| 4417 | WorldTilePosition world1 = mega1.megaToWorld(); |
| 4418 | WorldTilePosition world2 = mega2.megaToWorld() + Displacement { 1, 1 }; |
| 4419 | if (leveltype == DTYPE_CATHEDRAL) { |
| 4420 | ObjL1Special(world1.x, world1.y, world2.x, world2.y); |
| 4421 | AddL1Objs(world1.x, world1.y, world2.x, world2.y); |
| 4422 | } |
| 4423 | if (leveltype == DTYPE_CATACOMBS) { |
| 4424 | ObjL2Special(world1.x, world1.y, world2.x, world2.y); |
| 4425 | AddL2Objs(world1.x, world1.y, world2.x, world2.y); |
| 4426 | } |
| 4427 | if (leveltype == DTYPE_CAVES) { |
| 4428 | AddL3Objs(world1.x, world1.y, world2.x, world2.y); |
| 4429 | } |
| 4430 | if (leveltype == DTYPE_CRYPT) { |
| 4431 | AddCryptObjects(world1.x, world1.y, world2.x, world2.y); |
| 4432 | } |
| 4433 | ResyncDoors(world1, world2, true); |
| 4434 | } |
| 4435 | |
| 4436 | void ObjChangeMapResync(int x1, int y1, int x2, int y2) |
| 4437 | { |
no test coverage detected