Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate object materials into glyphmap #82

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

entrez
Copy link
Contributor

@entrez entrez commented Jun 25, 2022

Create a glyph for each object/material combination. This means that
material color is no longer assigned by a somewhat kludgy method that
only works for items present on the floor, but the resulting number of
glyphs is much larger. There aren't distinct tiles per material; every
material glyph for a particular object shares the same base tileidx.

These changes cover statues and 'normal' objects, but not corpses,
which are only ever generated with their base material as far as I'm
aware -- not much point in adding thousands of corpse material glyphs
which will slow down reset_glyphmap but otherwise go unused. If I'm
wrong and there are actually corpses with non-base materials, this will
require some editing (probably not to incorporate them into the expanded
glyphs, but to reactivate the old map_glyphinfo approach for corpses
only).

Create a glyph for each object/material combination.  This means that
material color is no longer assigned by a somewhat kludgy method that
only works for items present on the floor, but the resulting number of
glyphs is much larger.  There aren't distinct tiles per material; every
material glyph for a particular object shares the same base tileidx.
This commit covers only normal objects, not corpses or statues.
Use the same approach for statues as was used for "normal" objects in
the previous commit.  Does not include corpses, since they cannot
normally be generated in anything but their base material to my
knowledge.
As far as I know the only reason for calling reset_glyphmap upon every
level change is in case the hero is entering or exiting the rogue level
and the rogue symset/colors need to be switched with the normal
symset/colors.  Since xnh has removed the rogue level, this shouldn't be
necessary, and removing it will reduce the amount of time spent on
iterating through the increased number of glyphs.
I overlooked objnum_to_glyph in the initial object material glyphs
commit, so it was producing the wrong glyphs, turning the gold symbol in
the bottom line to a ')'.
@entrez entrez marked this pull request as draft June 9, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant