Vanilla: entries 128 to 255 of the color table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • backwardsEric
    Knight
    • Aug 2019
    • 531

    Vanilla: entries 128 to 255 of the color table

    In Vanilla, using a color index between 128 and 255 for a grid is going to trigger Windows, SDL, SDL2, or Mac front ends to try and render that grid with the front end's pict_hook (i.e. as a graphical tile). Are those entries there so the text-only front ends (GCU, X11, Nintendo) can use them? Or is there another rationale for those entries?

    I'm tempted to cut the color table size to 128 (and adjust how the same/hybrid background options are implemented since those are tied to MAX_COLORS).
  • smbhax
    Swordsman
    • Oct 2021
    • 340

    #2
    Does anything use a color table entry higher than 28?
    My Angband videos

    Comment

    • backwardsEric
      Knight
      • Aug 2019
      • 531

      #3
      As far as I know, the data files only use the first 27 colors and the code has named constants (well preprocessor macros) for the first 28. The preference files do allow color assignments from the full range of the table to features, monsters, and objects.

      Comment

      • Nick
        Vanilla maintainer
        • Apr 2007
        • 9647

        #4
        Originally posted by backwardsEric
        In Vanilla, using a color index between 128 and 255 for a grid is going to trigger Windows, SDL, SDL2, or Mac front ends to try and render that grid with the front end's pict_hook (i.e. as a graphical tile). Are those entries there so the text-only front ends (GCU, X11, Nintendo) can use them? Or is there another rationale for those entries?
        The only thing I know of is that NPP (and other variants that copied it) introduced a wider variety of colours by adding shades of the basic (then) 16. IIRC this was used as the basis for adding the new V colours 17-27. 28 was introduced for doing Sil-style shading of monsters and hybrid walls, and FA has a 29 originally for the trap detection line in wilderness, I think.

        So I think your plan is fine.
        One for the Dark Lord on his dark throne
        In the Land of Mordor where the Shadows lie.

        Comment

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