displaying generic objects
Add 17 fake objects to objects[], one for each object class. All specific color as gray. They're grouped at the start--actually near the start since "strange object" is still objects[0]--rather than being among the objects for each class. init_object() knows to start at [MAXOCLASSES] instead of [0]; other code that loops through every object might need adjusting. For potions, non-stone gems, and non-novel/non-Book_of_the_Dead spellbooks that don't have obj->dknown set, display the corresponding generic object rather the object itself. Fixes the longstanding bug of seeing color for not-yet-seen objects whose primary distinguishing characteristic is their color. Walking next to a generic object while able to see its spot will set dknown and redraw as specific. It's slightly disconcerting to have objects change as you reach them; I hope it's just a matter of becoming used to that. (If there is any code still changing the hero's location manually instead of using u_on_newpos(), it should be changed to use that routine.) Most of the new tiles are just a big rendering of punctuation characters. The potion, gem, and spellbook ones could be cloned from a specific object in their class and then have the color removed. I started out that way but wasn't happy with the result. I'm not artisticly inclined; hopefully someone else will do better. Each of them is preceded by a comment beginning with "#_"; the underscore isn't required, just being used to make the comments stand out a bit. Invalidates existing save and bones files.
This commit is contained in:
@@ -588,6 +588,7 @@ const struct instance_globals_o g_init_o = {
|
||||
UNDEFINED_PTR, /* occupation */
|
||||
0, /* occtime */
|
||||
UNDEFINED_VALUE, /* otg_temp */
|
||||
NULL, /* otg_otmp */
|
||||
NULL, /* occtxt */
|
||||
/* symbols.c */
|
||||
DUMMY, /* ov_primary_syms */
|
||||
|
||||
Reference in New Issue
Block a user