Handling Shockbolts in Angband 4.0.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nppangband
    NPPAngband Maintainer
    • Dec 2008
    • 926

    Handling Shockbolts in Angband 4.0.0

    I promise I tried to unsuccessfully sourcedive to get the answers before asking these questions.

    Shockbolt is almost done with his NPPAngband tileset (NPPMoria tileset to follow). I have yet to work out a good way to display the tiles that are twice as high as they are wide.

    How does Angband handle Shockbolt's 128x64 tiles? I recall a comment from Nick in a post a couple months ago that they are handled by an ugly hack, but I could not find it.

    I am assuming that, if a tile is2x1 in height, it simply occupies the square the monster is in, as well as the one above it? What if there is a monster right above the monster where the tile is a 2x1 ratio? How does the player know to attack or target a monster displayed with a 2x1 tile?

    If anyone can point me to the code in Angband 4.0.0 that handles this, I thank you in advance.
    NPPAngband current home page: http://nppangband.bitshepherd.net/
    Source code repository:
    https://github.com/nppangband/NPPAngband_QT
    Downloads:
    https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9634

    #2
    Originally posted by nppangband
    How does Angband handle Shockbolt's 128x64 tiles? I recall a comment from Nick in a post a couple months ago that they are handled by an ugly hack, but I could not find it.
    Look for any variable called or containing "overdraw" - it's handled in grafmode.c, and in main-win.c, main-sdl.c and main-cocoa.m.

    My main complaint is actually the way we draw multi-size tiles by putting something too big in the bottom right-hand corner and crossing our fingers.

    Originally posted by nppangband
    I am assuming that, if a tile is2x1 in height, it simply occupies the square the monster is in, as well as the one above it? What if there is a monster right above the monster where the tile is a 2x1 ratio? How does the player know to attack or target a monster displayed with a 2x1 tile?
    In practice it actually works OK - Shockbolt has carefully drawn the double-height tiles so the top half is gappy enough that you can see if there's something else on the grid above. Targeting temporarily blanks out the top half if you're on the monster above.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • nppangband
      NPPAngband Maintainer
      • Dec 2008
      • 926

      #3
      Originally posted by Nick
      Look for any variable called or containing "overdraw" - it's handled in grafmode.c, and in main-win.c, main-sdl.c and main-cocoa.m.

      My main complaint is actually the way we draw multi-size tiles by putting something too big in the bottom right-hand corner and crossing our fingers.

      Many thanks!

      How about adding a flag in cave_info called CAVE_OVERDRAW or something like that, so the game remembers where the double-height tiles are? That might solve the crossing your fingers complaint.
      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

      • Nick
        Vanilla maintainer
        • Apr 2007
        • 9634

        #4
        Originally posted by nppangband
        How about adding a flag in cave_info called CAVE_OVERDRAW or something like that, so the game remembers where the double-height tiles are? That might solve the crossing your fingers complaint.
        I'm afraid that violates core-UI split dogma. Also it's not just the double height tiles - it's whenever tiles are using multiple font grids. I suspect it's not a problem for your Qt port.
        One for the Dark Lord on his dark throne
        In the Land of Mordor where the Shadows lie.

        Comment

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