DUNGEON_HGT considered harmful

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • seebs
    Rookie
    • May 2013
    • 8

    DUNGEON_HGT considered harmful

    With cavern_gen existing, it is potentially the case that the map as a whole has a height other than DUNGEON_HGT, and a width other than DUNGEON_WID. And not just "if level is zero, it could be TOWN_HGT".

    Two options suggest themselves:

    1. Modify cavern_gen to use DUNGEON_HGT and DUNGEON_WID for caverns, too, even if the actual cavern is then centered inside that.
    2. Track down basically all uses of DUNGEON_HGT and fix them.
  • nppangband
    NPPAngband Maintainer
    • Dec 2008
    • 926

    #2
    For variants with small levels, like EYAngband and NPPAngband, the max dungeon height and width are stored in

    p_ptr->cur_map_hgt
    p_ptr->cur_map_wid

    They are defined at dungeon generation.
    NPPAngband current home page: http://nppangband.bitshepherd.net/
    Source code repository:
    https://github.com/nppangband/NPPAngband_QT
    Downloads:
    https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57

    Comment

    • seebs
      Rookie
      • May 2013
      • 8

      #3
      At least so far, it appears that cave->height and cave->width are correct for the current level, the *_gen functions all seem to correctly (well, nearly correctly) set the dungeon dimensions appropriately.

      Comment

      Working...
      😀
      😂
      🥰
      😘
      🤢
      😎
      😞
      😡
      👍
      👎