remove and transfer INVISIBLE_OBJECTS to branch
This commit is contained in:
@@ -16,9 +16,13 @@
|
||||
#include "mondata.h" /* for mindless() */
|
||||
#endif
|
||||
|
||||
#ifndef INVISIBLE_OBJECTS
|
||||
/*
|
||||
* vobj_at()
|
||||
*
|
||||
* Returns the head of the list of objects that the player can see
|
||||
* at location (x,y).
|
||||
*/
|
||||
#define vobj_at(x,y) (level.objects[x][y])
|
||||
#endif
|
||||
|
||||
/*
|
||||
* sensemon()
|
||||
|
||||
@@ -295,9 +295,6 @@ E void FDECL(bury_obj, (struct obj *));
|
||||
|
||||
/* ### display.c ### */
|
||||
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
E struct obj * FDECL(vobj_at, (XCHAR_P,XCHAR_P));
|
||||
#endif /* INVISIBLE_OBJECTS */
|
||||
E void FDECL(magic_map_background, (XCHAR_P,XCHAR_P,int));
|
||||
E void FDECL(map_background, (XCHAR_P,XCHAR_P,int));
|
||||
E void FDECL(map_trap, (struct trap *,int));
|
||||
|
||||
@@ -94,11 +94,7 @@ struct obj {
|
||||
Bitfield(recharged,3); /* number of times it's been recharged */
|
||||
#define on_ice recharged /* corpse on ice */
|
||||
Bitfield(lamplit,1); /* a light-source -- can be lit */
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
Bitfield(oinvis,1); /* invisible */
|
||||
#else
|
||||
Bitfield(oreserved1,1);
|
||||
#endif
|
||||
Bitfield(oreserved1,1); /* was the placeholder for invisible objects, free for use */
|
||||
Bitfield(greased,1); /* covered with grease */
|
||||
Bitfield(nomerge,1); /* set temporarily to prevent merging */
|
||||
Bitfield(was_thrown,1); /* thrown by hero since last picked up */
|
||||
|
||||
@@ -715,9 +715,6 @@ struct obj *obj;
|
||||
|
||||
if(!getdir((char *)0)) return 0;
|
||||
invis_mirror = Invis;
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
if (obj->oinvis) invis_mirror = TRUE;
|
||||
#endif
|
||||
useeit = !Blind && (!invis_mirror || See_invisible);
|
||||
uvisage = (ACURR(A_CHA) > 14) ?
|
||||
(poly_gender() == 1 ? "beautiful" : "handsome") : "ugly";
|
||||
|
||||
@@ -139,30 +139,6 @@ STATIC_DCL int FDECL(wall_angle, (struct rm *));
|
||||
|
||||
#define remember_topology(x,y) (lastseentyp[x][y] = levl[x][y].typ)
|
||||
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
/*
|
||||
* vobj_at()
|
||||
*
|
||||
* Returns a pointer to an object if the hero can see an object at the
|
||||
* given location. This takes care of invisible objects. NOTE, this
|
||||
* assumes that the hero is not blind and on top of the object pile.
|
||||
* It does NOT take into account that the location is out of sight, or,
|
||||
* say, one can see blessed, etc.
|
||||
*/
|
||||
struct obj *
|
||||
vobj_at(x,y)
|
||||
xchar x,y;
|
||||
{
|
||||
register struct obj *obj = level.objects[x][y];
|
||||
|
||||
while (obj) {
|
||||
if (!obj->oinvis || See_invisible) return obj;
|
||||
obj = obj->nexthere;
|
||||
}
|
||||
return ((struct obj *) 0);
|
||||
}
|
||||
#endif /* else vobj_at() is defined in display.h */
|
||||
|
||||
/*
|
||||
* magic_map_background()
|
||||
*
|
||||
|
||||
@@ -854,9 +854,6 @@ register struct obj *obj;
|
||||
/* can now see invisible monsters */
|
||||
set_mimic_blocking(); /* do special mimic handling */
|
||||
see_monsters();
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
see_objects();
|
||||
#endif
|
||||
|
||||
if (Invis && !oldprop && !HSee_invisible && !Blind) {
|
||||
newsym(u.ux,u.uy);
|
||||
@@ -966,9 +963,6 @@ boolean gone;
|
||||
if (!See_invisible) {
|
||||
set_mimic_blocking(); /* do special mimic handling */
|
||||
see_monsters();
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
see_objects();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (Invisible && !Blind) {
|
||||
|
||||
@@ -2315,9 +2315,6 @@ boolean picked_some;
|
||||
/* only one object */
|
||||
if (dfeature) pline1(fbuf);
|
||||
read_engr_at(u.ux, u.uy); /* Eric Backus */
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
if (otmp->oinvis && !See_invisible) verb = "feel";
|
||||
#endif
|
||||
You("%s here %s.", verb, doname(otmp));
|
||||
iflags.last_msg = PLNMSG_ONE_ITEM_HERE;
|
||||
if (otmp->otyp == CORPSE) feel_cockatrice(otmp, FALSE);
|
||||
@@ -2421,9 +2418,6 @@ mergable(otmp, obj) /* returns TRUE if obj & otmp can be merged */
|
||||
obj->obroken != otmp->obroken ||
|
||||
obj->otrapped != otmp->otrapped ||
|
||||
obj->lamplit != otmp->lamplit ||
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
obj->oinvis != otmp->oinvis ||
|
||||
#endif
|
||||
obj->greased != otmp->greased ||
|
||||
obj->oeroded != otmp->oeroded ||
|
||||
obj->oeroded2 != otmp->oeroded2 ||
|
||||
|
||||
@@ -606,9 +606,6 @@ boolean artif;
|
||||
otmp->known = 1;
|
||||
otmp->lknown = 0;
|
||||
otmp->cknown = 0;
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
otmp->oinvis = !rn2(1250);
|
||||
#endif
|
||||
otmp->corpsenm = NON_PM;
|
||||
|
||||
if (init) switch (let) {
|
||||
|
||||
@@ -303,11 +303,6 @@ unsigned corpseflags;
|
||||
*/
|
||||
if (Blind && !sensemon(mtmp)) obj->dknown = 0;
|
||||
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
/* Invisible monster ==> invisible corpse */
|
||||
obj->oinvis = mtmp->minvis;
|
||||
#endif
|
||||
|
||||
stackobj(obj);
|
||||
newsym(x, y);
|
||||
return obj;
|
||||
@@ -858,9 +853,6 @@ mpickstuff(mtmp, str)
|
||||
if (!touch_artifact(otmp,mtmp)) continue;
|
||||
if (!can_carry(mtmp,otmp)) continue;
|
||||
if (is_pool(mtmp->mx,mtmp->my)) continue;
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
if (otmp->oinvis && !perceives(mtmp->data)) continue;
|
||||
#endif
|
||||
if (cansee(mtmp->mx,mtmp->my) && flags.verbose)
|
||||
pline("%s picks up %s.", Monnam(mtmp),
|
||||
(distu(mtmp->mx, mtmp->my) <= 5) ?
|
||||
|
||||
18
src/objnam.c
18
src/objnam.c
@@ -683,10 +683,6 @@ register struct obj *obj;
|
||||
} else
|
||||
Strcpy(prefix, "a ");
|
||||
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
if (obj->oinvis) Strcat(prefix,"invisible ");
|
||||
#endif
|
||||
|
||||
/* "empty" goes at the beginning, but item count goes at the end */
|
||||
if (cknown &&
|
||||
(Is_container(obj) || obj->otyp == STATUE) && !Has_contents(obj))
|
||||
@@ -2241,9 +2237,6 @@ struct obj *no_wish;
|
||||
int cnt, spe, spesgn, typ, very, rechrg;
|
||||
int blessed, uncursed, iscursed, ispoisoned, isgreased;
|
||||
int eroded, eroded2, erodeproof;
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
int isinvisible;
|
||||
#endif
|
||||
int halfeaten, mntmp, contents;
|
||||
int islit, unlabeled, ishistoric, isdiluted, trapped;
|
||||
int tmp, tinv, tvariety;
|
||||
@@ -2271,9 +2264,6 @@ struct obj *no_wish;
|
||||
|
||||
cnt = spe = spesgn = typ = very = rechrg =
|
||||
blessed = uncursed = iscursed =
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
isinvisible =
|
||||
#endif
|
||||
ispoisoned = isgreased = eroded = eroded2 = erodeproof =
|
||||
halfeaten = islit = unlabeled = ishistoric = isdiluted =
|
||||
trapped = 0;
|
||||
@@ -2324,10 +2314,6 @@ struct obj *no_wish;
|
||||
iscursed = 1;
|
||||
} else if (!strncmpi(bp, "uncursed ", l=9)) {
|
||||
uncursed = 1;
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
} else if (!strncmpi(bp, "invisible ", l=10)) {
|
||||
isinvisible = 1;
|
||||
#endif
|
||||
} else if (!strncmpi(bp, "rustproof ", l=10) ||
|
||||
!strncmpi(bp, "erodeproof ", l=11) ||
|
||||
!strncmpi(bp, "corrodeproof ", l=13) ||
|
||||
@@ -3137,10 +3123,6 @@ typfnd:
|
||||
curse(otmp);
|
||||
}
|
||||
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
if (isinvisible) otmp->oinvis = 1;
|
||||
#endif
|
||||
|
||||
/* set eroded */
|
||||
if (is_damageable(otmp) || otmp->otyp == CRYSKNIFE) {
|
||||
if (eroded && (is_flammable(otmp) || is_rustprone(otmp)))
|
||||
|
||||
@@ -1266,9 +1266,6 @@ boolean telekinesis; /* not picking it up directly by hand */
|
||||
/* In case of auto-pickup, where we haven't had a chance
|
||||
to look at it yet; affects docall(SCR_SCARE_MONSTER). */
|
||||
if (!Blind)
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
if (!obj->oinvis || See_invisible)
|
||||
#endif
|
||||
obj->dknown = 1;
|
||||
|
||||
if (obj == uchain) { /* do not pick up attached chain */
|
||||
|
||||
22
src/potion.c
22
src/potion.c
@@ -1909,28 +1909,6 @@ dodip()
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
if (potion->otyp == POT_INVISIBILITY && !obj->oinvis) {
|
||||
obj->oinvis = TRUE;
|
||||
if (!Blind) {
|
||||
if (!See_invisible) pline("Where did %s go?",
|
||||
the(xname(obj)));
|
||||
else You("notice a little haziness around %s.",
|
||||
the(xname(obj)));
|
||||
}
|
||||
goto poof;
|
||||
} else if (potion->otyp == POT_SEE_INVISIBLE && obj->oinvis) {
|
||||
obj->oinvis = FALSE;
|
||||
if (!Blind) {
|
||||
if (!See_invisible) pline("So that's where %s went!",
|
||||
the(xname(obj)));
|
||||
else pline_The("haziness around %s disappears.",
|
||||
the(xname(obj)));
|
||||
}
|
||||
goto poof;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(is_poisonable(obj)) {
|
||||
if(potion->otyp == POT_SICKNESS && !obj->opoisoned) {
|
||||
char buf[BUFSZ];
|
||||
|
||||
22
src/steal.c
22
src/steal.c
@@ -242,26 +242,14 @@ nothing_to_steal:
|
||||
retry:
|
||||
tmp = 0;
|
||||
for(otmp = invent; otmp; otmp = otmp->nobj)
|
||||
if ((!uarm || otmp != uarmc) && otmp != uskin
|
||||
&& otmp->oclass != COIN_CLASS
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
&& (!otmp->oinvis || perceives(mtmp->data))
|
||||
#endif
|
||||
)
|
||||
tmp += ((otmp->owornmask &
|
||||
(W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1);
|
||||
if ((!uarm || otmp != uarmc) && otmp != uskin && otmp->oclass != COIN_CLASS)
|
||||
tmp += ((otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1);
|
||||
if (!tmp) goto nothing_to_steal;
|
||||
tmp = rn2(tmp);
|
||||
for(otmp = invent; otmp; otmp = otmp->nobj)
|
||||
if ((!uarm || otmp != uarmc) && otmp != uskin
|
||||
&& otmp->oclass != COIN_CLASS
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
&& (!otmp->oinvis || perceives(mtmp->data))
|
||||
#endif
|
||||
)
|
||||
if((tmp -= ((otmp->owornmask &
|
||||
(W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1)) < 0)
|
||||
break;
|
||||
if ((!uarm || otmp != uarmc) && otmp != uskin && otmp->oclass != COIN_CLASS)
|
||||
if((tmp -= ((otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1)) < 0)
|
||||
break;
|
||||
if(!otmp) {
|
||||
impossible("Steal fails!");
|
||||
return(0);
|
||||
|
||||
@@ -183,11 +183,6 @@ struct monst *mon;
|
||||
if (is_pick(otmp) &&
|
||||
(passes_walls(ptr) && thick_skinned(ptr))) tmp += 2;
|
||||
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
/* Invisible weapons against monsters who can't see invisible */
|
||||
if (otmp->oinvis && !perceives(ptr)) tmp += 3;
|
||||
#endif
|
||||
|
||||
/* Check specially named weapon "to hit" bonuses */
|
||||
if (otmp->oartifact) tmp += spec_abon(otmp, mon);
|
||||
|
||||
|
||||
@@ -979,10 +979,6 @@ register struct obj *obj;
|
||||
}
|
||||
unbless(obj);
|
||||
uncurse(obj);
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
/*[this will be insufficient if it ever reduces obj's shop value]*/
|
||||
if (obj->oinvis) obj->oinvis = 0;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1833,10 +1829,6 @@ struct obj *obj, *otmp;
|
||||
(void) rloco(obj);
|
||||
break;
|
||||
case WAN_MAKE_INVISIBLE:
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
obj->oinvis = TRUE;
|
||||
newsym(obj->ox,obj->oy); /* make object disappear */
|
||||
#endif
|
||||
break;
|
||||
case WAN_UNDEAD_TURNING:
|
||||
case SPE_TURN_UNDEAD:
|
||||
|
||||
Reference in New Issue
Block a user