Incorporate object materials into glyphmap#82
Draft
entrez wants to merge 4 commits intocopperwater:masterfrom
Draft
Incorporate object materials into glyphmap#82entrez wants to merge 4 commits intocopperwater:masterfrom
entrez wants to merge 4 commits intocopperwater:masterfrom
Conversation
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 ')'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_glyphmapbut otherwise go unused. If I'mwrong 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_glyphinfoapproach for corpsesonly).