Since the touchstone uses objclass oc_color we need
to make that field unconditional, otherwise NetHack won't compile without TEXTCOLOR defined. Also provides at least an interim solution for the has_color() problem that Warwick pointed out. Lastly, Archeologists know touchstones.
This commit is contained in:
@@ -91,9 +91,8 @@ struct objclass {
|
||||
uchar oc_oprop; /* property (invis, &c.) conveyed */
|
||||
char oc_class; /* object class */
|
||||
schar oc_delay; /* delay when using such an object */
|
||||
#ifdef TEXTCOLOR
|
||||
uchar oc_color; /* display color of the object */
|
||||
#endif /* TEXTCOLOR */
|
||||
uchar oc_color; /* color of the object */
|
||||
|
||||
short oc_prob; /* probability, used in mkobj() */
|
||||
unsigned short oc_weight; /* encumbrance (1 cn = 0.1 lb.) */
|
||||
short oc_cost; /* base cost in shops */
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||
* and save files.
|
||||
*/
|
||||
#define EDITLEVEL 1
|
||||
#define EDITLEVEL 2
|
||||
|
||||
#define COPYRIGHT_BANNER_A \
|
||||
"NetHack, Copyright 1985-2002"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#if defined(TTY_GRAPHICS)
|
||||
#include "wintty.h" /* for prototype of has_color() only */
|
||||
#endif
|
||||
#include "color.h"
|
||||
|
||||
int explcolors[] = {
|
||||
CLR_BLACK, /* dark */
|
||||
@@ -17,6 +18,10 @@ int explcolors[] = {
|
||||
CLR_WHITE, /* frosty */
|
||||
};
|
||||
|
||||
#if !defined(TTY_GRAPHICS)
|
||||
#define has_color(n) TRUE
|
||||
#endif
|
||||
|
||||
#ifdef TEXTCOLOR
|
||||
#define zap_color(n) color = iflags.use_color ? zapcolors[n] : NO_COLOR
|
||||
#define cmap_color(n) color = iflags.use_color ? defsyms[n].color : NO_COLOR
|
||||
|
||||
@@ -75,9 +75,7 @@ shuffle(o_low, o_high, domaterial)
|
||||
{
|
||||
int i, j, num_to_shuffle;
|
||||
short sw;
|
||||
#ifdef TEXTCOLOR
|
||||
int color;
|
||||
#endif /* TEXTCOLOR */
|
||||
|
||||
for (num_to_shuffle = 0, j=o_low; j <= o_high; j++)
|
||||
if (!objects[j].oc_name_known) num_to_shuffle++;
|
||||
@@ -94,11 +92,10 @@ shuffle(o_low, o_high, domaterial)
|
||||
sw = objects[j].oc_tough;
|
||||
objects[j].oc_tough = objects[i].oc_tough;
|
||||
objects[i].oc_tough = sw;
|
||||
#ifdef TEXTCOLOR
|
||||
color = objects[j].oc_color;
|
||||
objects[j].oc_color = objects[i].oc_color;
|
||||
objects[i].oc_color = color;
|
||||
#endif /* TEXTCOLOR */
|
||||
|
||||
/* shuffle material */
|
||||
if (domaterial) {
|
||||
sw = objects[j].oc_material;
|
||||
|
||||
@@ -13,12 +13,8 @@ struct monst { struct monst *dummy; }; /* lint: struct obj's union */
|
||||
|
||||
#else /* !OBJECTS_PASS_2_ */
|
||||
/* second pass */
|
||||
# ifdef TEXTCOLOR
|
||||
#include "color.h"
|
||||
# define COLOR_FIELD(X) X,
|
||||
# else
|
||||
# define COLOR_FIELD(X) /*empty*/
|
||||
# endif
|
||||
#endif /* !OBJECTS_PASS_2_ */
|
||||
|
||||
|
||||
|
||||
@@ -608,6 +608,7 @@ u_init()
|
||||
else if(!rn2(4)) ini_inv(Lamp);
|
||||
else if(!rn2(10)) ini_inv(Magicmarker);
|
||||
knows_object(SACK);
|
||||
knows_object(TOUCHSTONE);
|
||||
skill_init(Skill_A);
|
||||
break;
|
||||
case PM_BARBARIAN:
|
||||
|
||||
Reference in New Issue
Block a user