separate MAIL functionality from MAIL-related structure inclusion

With 3.7+ aspirations of improving savefile interoperability between 32-bit
and 64-bit builds, as well as between platforms, it is better to not have
the underlying struct/array content be conditional.

This splits off some of the MAIL code into MAIL_STRUCTURES code. In theory,
since MAIL_STRUCTURES is unconditionally included, the macro could
just go away and leave that code unconditional, but this commit doesn't
go that far.
This commit is contained in:
nhmall
2019-11-09 16:19:05 -05:00
parent e6bafb3f90
commit 75d22a2dbf
20 changed files with 41 additions and 29 deletions

View File

@@ -1013,7 +1013,7 @@ unsigned doname_flags;
|| ((!known || !objects[obj->otyp].oc_charged
|| obj->oclass == ARMOR_CLASS
|| obj->oclass == RING_CLASS)
#ifdef MAIL
#ifdef MAIL_STRUCTURES
&& obj->otyp != SCR_MAIL
#endif
&& obj->otyp != FAKE_AMULET_OF_YENDOR
@@ -1326,7 +1326,7 @@ struct obj *otmp;
return FALSE; /* always fully ID'd */
/* check fundamental ID hallmarks first */
if (!otmp->known || !otmp->dknown
#ifdef MAIL
#ifdef MAIL_STRUCTURES
|| (!otmp->bknown && otmp->otyp != SCR_MAIL)
#else
|| !otmp->bknown
@@ -3861,7 +3861,7 @@ struct obj *no_wish;
case STATUE:
/* otmp->cobj already done in mksobj() */
break;
#ifdef MAIL
#ifdef MAIL_STRUCTURES
case SCR_MAIL:
/* 0: delivered in-game via external event (or randomly for fake mail);
1: from bones or wishing; 2: written with marker */
@@ -3909,7 +3909,7 @@ struct obj *no_wish;
break;
case FIGURINE:
if (!(mons[mntmp].geno & G_UNIQ) && !is_human(&mons[mntmp])
#ifdef MAIL
#ifdef MAIL_STRUCTURES
&& mntmp != PM_MAIL_DAEMON
#endif
)