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

@@ -1231,7 +1231,7 @@ int mat, minwt;
continue;
if (obj_resists(otmp, 0, 0))
continue; /* preserve unique objects */
#ifdef MAIL
#ifdef MAIL_STRUCTURES
if (otmp->otyp == SCR_MAIL)
continue;
#endif
@@ -1358,7 +1358,7 @@ struct obj *obj;
{
long i;
#ifdef MAIL
#ifdef MAIL_STRUCTURES
if (obj->otyp == SCR_MAIL)
return;
#endif
@@ -1456,7 +1456,7 @@ int id;
/* preserve inventory letter if in inventory */
if (obj_location == OBJ_INVENT)
otmp->invlet = obj->invlet;
#ifdef MAIL
#ifdef MAIL_STRUCTURES
/* You can't send yourself 100 mail messages and then
* polymorph them into useful scrolls
*/