diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-04-02 21:53:11 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-04-02 22:08:27 +0200 |
commit | 6eb6d9b8aa702f333d480158265cc0c3a469a0c9 (patch) | |
tree | a8d164a36e347a73413997600d2d3e866de5a3b8 /src/q_thrain.c | |
parent | 9bbfe24fccd16a17c89f9222ded38aa5a220c4f6 (diff) |
Refactor: Clean up process_dungeon_file()
Diffstat (limited to 'src/q_thrain.c')
-rw-r--r-- | src/q_thrain.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/q_thrain.c b/src/q_thrain.c index 8b2df5a4..b2b1be9f 100644 --- a/src/q_thrain.c +++ b/src/q_thrain.c @@ -104,12 +104,7 @@ bool_ quest_thrain_gen_hook(char *fmt) bx0 = get_next_arg(fmt); /* Pick a room size */ - xsize = 0; - ysize = 0; - init_flags = INIT_GET_SIZE; - process_dungeon_file_full = TRUE; - process_dungeon_file(NULL, "thrain.map", &ysize, &xsize, cur_hgt, cur_wid, TRUE); - process_dungeon_file_full = FALSE; + get_map_size("thrain.map", &ysize, &xsize); /* Try to allocate space for room. If fails, exit */ if (!room_alloc(xsize + 2, ysize + 2, FALSE, by0, bx0, &xval, &yval)) return FALSE; @@ -141,9 +136,7 @@ bool_ quest_thrain_gen_hook(char *fmt) xstart = x1; ystart = y1; init_flags = INIT_CREATE_DUNGEON; - process_dungeon_file_full = TRUE; - process_dungeon_file(NULL, "thrain.map", &ystart, &xstart, cur_hgt, cur_wid, TRUE); - process_dungeon_file_full = FALSE; + process_dungeon_file("thrain.map", &ystart, &xstart, cur_hgt, cur_wid, TRUE, TRUE); for (x = x1; x < xstart; x++) for (y = y1; y < ystart; y++) |