View Single Post
Old May 2, 2013, 09:39   #1
PowerWyrm
Veteran
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,385
PowerWyrm is on a distinguished road
[3.5-dev] Possible crash on cavern levels

Since the removal of the in_bounds macros, I think it's possible to crash the game on cavern levels because the layout doesn't generate permanent walls outside of the cavern bounds.

See init_cavern():

Code:
/* Fill the edges with perma-rock, and rest with rock */
draw_rectangle(c, 0, 0, DUNGEON_HGT - 1, DUNGEON_WID - 1, FEAT_PERM_SOLID);
fill_rectangle(c, 1, 1, DUNGEON_HGT - 2, DUNGEON_WID - 2, FEAT_WALL_SOLID);
compared to the same code for the town:

Code:
/* Start with solid walls, and then create some floor in the middle */
fill_rectangle(c, 0, 0, DUNGEON_HGT - 1, DUNGEON_WID - 1, FEAT_PERM_SOLID);
fill_rectangle(c, 1, 1, c->height -2, c->width - 2, FEAT_FLOOR);
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote