Repair recent tile mapping error when MAIL is undefined

Changes to be committed:
	modified:   src/objects.c
	modified:   win/share/tilemap.c

Warnings during tile builds (and incorrect tile mappings
at run time when MAIL wasn't defined):
	Creating 16x16 binary tile files (this may take some time)
	warning: for tile 325 (numbered 325) of objects.txt,
	        found 'ETAOIN SHRDLU' while expecting 'stamped / mail'
	warning: for tile 326 (numbered 326) of objects.txt,
	        found 'LOREM IPSUM' while expecting 'ETAOIN SHRDLU'

The recent addition of the first new extra scroll descriptions in a
very long time caused this problem to show up when MAIL was undefined.

There was a magic number in use that made an assumption that there
were only 4 such extra scroll descriptions, those being
"FOOBIE BLETCH", "TEMOV","GARVEN DEH","READ ME"
This commit is contained in:
nhmall
2015-11-12 00:42:52 -05:00
parent ecd277cec2
commit 39a1667677
2 changed files with 6 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 objects.c $NHDT-Date: 1444617222 2015/10/12 02:33:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.46 $ */
/* NetHack 3.6 objects.c $NHDT-Date: 1447306896 2015/11/12 05:41:36 $ $NHDT-Branch: master $:$NHDT-Revision: 1.48 $ */
/* Copyright (c) Mike Threepoint, 1989. */
/* NetHack may be freely redistributed. See license for details. */
@@ -847,6 +847,7 @@ SCROLL("punishment", "VE FORBRYDERNE", 1, 15, 300),
SCROLL("charging", "HACKEM MUCHE", 1, 15, 300),
SCROLL("stinking cloud", "VELOX NEB", 1, 15, 300),
/* extra descriptions, shuffled into use at start of new game */
/* Code in win/share/tilemap.c depends on SCR_STINKING_CLOUD preceding these */
SCROLL(None, "FOOBIE BLETCH", 1, 0, 100),
SCROLL(None, "TEMOV", 1, 0, 100),
SCROLL(None, "GARVEN DEH", 1, 0, 100),

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 tilemap.c $NHDT-Date: 1432512803 2015/05/25 00:13:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.24 $ */
/* NetHack 3.6 tilemap.c $NHDT-Date: 1447306925 2015/11/12 05:42:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $ */
/* NetHack may be freely redistributed. See license for details. */
/*
@@ -28,6 +28,8 @@ extern void FDECL(exit, (int));
#define OBJ_GLYPH 2
#define OTH_GLYPH 3 /* fortunately unnecessary */
#define EXTRA_SCROLL_DESCR_COUNT ((SCR_BLANK_PAPER - SCR_STINKING_CLOUD) - 1)
/* note that the ifdefs here should be the opposite sense from monst.c/
* objects.c/rm.h
*/
@@ -64,7 +66,7 @@ struct conditionals {
* don't know what a slime mold should look like when renamed anyway
*/
#ifndef MAIL
{ OBJ_GLYPH, SCR_STINKING_CLOUD + 4, "stamped / mail" },
{ OBJ_GLYPH, SCR_STINKING_CLOUD + EXTRA_SCROLL_DESCR_COUNT, "stamped / mail" },
#endif
{ 0, 0, 0 }
};