| 349 | } |
| 350 | |
| 351 | void DRLG_CreateThemeRoom(int themeIndex) |
| 352 | { |
| 353 | int xx, yy; |
| 354 | |
| 355 | for (yy = themeLoc[themeIndex].y; yy < themeLoc[themeIndex].y + themeLoc[themeIndex].height; yy++) { |
| 356 | for (xx = themeLoc[themeIndex].x; xx < themeLoc[themeIndex].x + themeLoc[themeIndex].width; xx++) { |
| 357 | if (leveltype == DTYPE_CATACOMBS) { |
| 358 | if (yy == themeLoc[themeIndex].y |
| 359 | && xx >= themeLoc[themeIndex].x |
| 360 | && xx <= themeLoc[themeIndex].x + themeLoc[themeIndex].width |
| 361 | || yy == themeLoc[themeIndex].y + themeLoc[themeIndex].height - 1 |
| 362 | && xx >= themeLoc[themeIndex].x |
| 363 | && xx <= themeLoc[themeIndex].x + themeLoc[themeIndex].width) { |
| 364 | dungeon[xx][yy] = 2; |
| 365 | } else if (xx == themeLoc[themeIndex].x |
| 366 | && yy >= themeLoc[themeIndex].y |
| 367 | && yy <= themeLoc[themeIndex].y + themeLoc[themeIndex].height |
| 368 | || xx == themeLoc[themeIndex].x + themeLoc[themeIndex].width - 1 |
| 369 | && yy >= themeLoc[themeIndex].y |
| 370 | && yy <= themeLoc[themeIndex].y + themeLoc[themeIndex].height) { |
| 371 | dungeon[xx][yy] = 1; |
| 372 | } else { |
| 373 | dungeon[xx][yy] = 3; |
| 374 | } |
| 375 | } |
| 376 | if (leveltype == DTYPE_CAVES) { |
| 377 | if (yy == themeLoc[themeIndex].y |
| 378 | && xx >= themeLoc[themeIndex].x |
| 379 | && xx <= themeLoc[themeIndex].x + themeLoc[themeIndex].width |
| 380 | || yy == themeLoc[themeIndex].y + themeLoc[themeIndex].height - 1 |
| 381 | && xx >= themeLoc[themeIndex].x |
| 382 | && xx <= themeLoc[themeIndex].x + themeLoc[themeIndex].width) { |
| 383 | dungeon[xx][yy] = 134; |
| 384 | } else if (xx == themeLoc[themeIndex].x |
| 385 | && yy >= themeLoc[themeIndex].y |
| 386 | && yy <= themeLoc[themeIndex].y + themeLoc[themeIndex].height |
| 387 | || xx == themeLoc[themeIndex].x + themeLoc[themeIndex].width - 1 |
| 388 | && yy >= themeLoc[themeIndex].y |
| 389 | && yy <= themeLoc[themeIndex].y + themeLoc[themeIndex].height) { |
| 390 | dungeon[xx][yy] = 137; |
| 391 | } else { |
| 392 | dungeon[xx][yy] = 7; |
| 393 | } |
| 394 | } |
| 395 | if (leveltype == DTYPE_HELL) { |
| 396 | if (yy == themeLoc[themeIndex].y |
| 397 | && xx >= themeLoc[themeIndex].x |
| 398 | && xx <= themeLoc[themeIndex].x + themeLoc[themeIndex].width |
| 399 | || yy == themeLoc[themeIndex].y + themeLoc[themeIndex].height - 1 |
| 400 | && xx >= themeLoc[themeIndex].x |
| 401 | && xx <= themeLoc[themeIndex].x + themeLoc[themeIndex].width) { |
| 402 | dungeon[xx][yy] = 2; |
| 403 | } else if (xx == themeLoc[themeIndex].x |
| 404 | && yy >= themeLoc[themeIndex].y |
| 405 | && yy <= themeLoc[themeIndex].y + themeLoc[themeIndex].height |
| 406 | || xx == themeLoc[themeIndex].x + themeLoc[themeIndex].width - 1 |
| 407 | && yy >= themeLoc[themeIndex].y |
| 408 | && yy <= themeLoc[themeIndex].y + themeLoc[themeIndex].height) { |
no test coverage detected