Merge branch 'master' into win32-x64-working

This commit is contained in:
nhmall
2015-04-19 13:47:09 -04:00
11 changed files with 164 additions and 74 deletions
+1 -1
View File
@@ -1151,7 +1151,7 @@ tty,win32gui,win32tty: add menucolors
NetHack Community Patches (or Variation) Included NetHack Community Patches (or Variation) Included
------------------------------------------------- -------------------------------------------------
Roderick Schertler's pickup_thrown patch Roderick Schertler's pickup_thrown patch
Malcolm Ryan's Statue Glyphs patch adopt/adapt/extend Malcolm Ryan's Statue Glyphs patch to work for tty and tiles
adopt/adapt/improve the Paranoid_Quit patch; default is paranoid_confirm:pray adopt/adapt/improve the Paranoid_Quit patch; default is paranoid_confirm:pray
paranoid_confirm:Confirm when requiring "yes" instead of y to confirm, paranoid_confirm:Confirm when requiring "yes" instead of y to confirm,
also require explicit "no" to reject also require explicit "no" to reject
+13 -8
View File
@@ -564,15 +564,17 @@ feel_location(x, y)
if (lev->typ != ROOM && lev->seenv) { if (lev->typ != ROOM && lev->seenv) {
map_background(x, y, 1); map_background(x, y, 1);
} else { } else {
lev->glyph = lev->waslit ? cmap_to_glyph(S_room) : lev->glyph = flags.dark_room ? cmap_to_glyph(S_darkroom) :
cmap_to_glyph(S_stone); (lev->waslit ? cmap_to_glyph(S_room) :
cmap_to_glyph(S_stone));
show_glyph(x,y,lev->glyph); show_glyph(x,y,lev->glyph);
} }
} else if ((lev->glyph >= cmap_to_glyph(S_stone) && } else if ((lev->glyph >= cmap_to_glyph(S_stone) &&
lev->glyph < cmap_to_glyph(S_room)) || lev->glyph < cmap_to_glyph(S_darkroom)) ||
glyph_is_invisible(levl[x][y].glyph)) { glyph_is_invisible(levl[x][y].glyph)) {
lev->glyph = lev->waslit ? cmap_to_glyph(S_room) : lev->glyph = flags.dark_room ? cmap_to_glyph(S_darkroom) :
cmap_to_glyph(S_stone); (lev->waslit ? cmap_to_glyph(S_room) :
cmap_to_glyph(S_stone));
show_glyph(x,y,lev->glyph); show_glyph(x,y,lev->glyph);
} }
} else { } else {
@@ -583,6 +585,9 @@ feel_location(x, y)
if (lev->typ == CORR && if (lev->typ == CORR &&
lev->glyph == cmap_to_glyph(S_litcorr) && !lev->waslit) lev->glyph == cmap_to_glyph(S_litcorr) && !lev->waslit)
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_corr)); show_glyph(x, y, lev->glyph = cmap_to_glyph(S_corr));
else if (lev->typ == ROOM && flags.dark_room &&
lev->glyph == cmap_to_glyph(S_room))
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_darkroom));
} }
} else { } else {
_map_location(x, y, 1); _map_location(x, y, 1);
@@ -610,9 +615,9 @@ feel_location(x, y)
} }
/* Floor spaces are dark if unlit. Corridors are dark if unlit. */ /* Floor spaces are dark if unlit. Corridors are dark if unlit. */
if (lev->typ == ROOM && if (lev->typ == ROOM && lev->glyph == cmap_to_glyph(S_room) &&
lev->glyph == cmap_to_glyph(S_room) && !lev->waslit) (!lev->waslit || flags.dark_room))
show_glyph(x,y, lev->glyph = cmap_to_glyph(S_stone)); show_glyph(x,y, lev->glyph = cmap_to_glyph(flags.dark_room ? S_darkroom : S_stone));
else if (lev->typ == CORR && else if (lev->typ == CORR &&
lev->glyph == cmap_to_glyph(S_litcorr) && !lev->waslit) lev->glyph == cmap_to_glyph(S_litcorr) && !lev->waslit)
show_glyph(x,y, lev->glyph = cmap_to_glyph(S_corr)); show_glyph(x,y, lev->glyph = cmap_to_glyph(S_corr));
+50 -32
View File
@@ -1,4 +1,4 @@
/* NetHack 3.5 hack.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ /* NetHack 3.5 hack.c $NHDT-Date: 1429412557 2015/04/19 03:02:37 $ $NHDT-Branch: master $:$NHDT-Revision: 1.143 $ */
/* NetHack 3.5 hack.c $Date: 2013/10/26 21:33:47 $ $Revision: 1.120 $ */ /* NetHack 3.5 hack.c $Date: 2013/10/26 21:33:47 $ $Revision: 1.120 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1336,49 +1336,67 @@ domove()
if (context.forcefight || if (context.forcefight ||
/* remembered an 'I' && didn't use a move command */ /* remembered an 'I' && didn't use a move command */
(glyph_is_invisible(levl[x][y].glyph) && !context.nopick)) { (glyph_is_invisible(levl[x][y].glyph) && !context.nopick)) {
struct obj *boulder = sobj_at(BOULDER, x, y); struct obj *boulder = 0;
boolean explo = (Upolyd && attacktype(youmonst.data, AT_EXPL)), boolean explo = (Upolyd && attacktype(youmonst.data, AT_EXPL)),
solid = !accessible(x, y); solid = !accessible(x, y);
int glyph = glyph_at(x, y); /* might be monster */ int glyph = glyph_at(x, y); /* might be monster */
char buf[BUFSZ]; char buf[BUFSZ];
/* if a statue is displayed at the target location, if (!Underwater) {
player is attempting to attack it [and boulder boulder = sobj_at(BOULDER, x, y);
handlng below is suitable for handling that] */ /* if a statue is displayed at the target location,
if (glyph_is_statue(glyph) || player is attempting to attack it [and boulder
(Hallucination && glyph_is_monster(glyph))) handlng below is suitable for handling that] */
boulder = sobj_at(STATUE, x, y); if (glyph_is_statue(glyph) ||
(Hallucination && glyph_is_monster(glyph)))
boulder = sobj_at(STATUE, x, y);
/* force fight at boulder/statue or wall/door while wielding /* force fight at boulder/statue or wall/door while wielding
pick: start digging to break the boulder or wall */ pick: start digging to break the boulder or wall */
if (context.forcefight && if (context.forcefight &&
/* can we dig? */ /* can we dig? */
uwep && dig_typ(uwep, x, y) && uwep && dig_typ(uwep, x, y) &&
/* should we dig? */ /* should we dig? */
!glyph_is_invisible(glyph) && !glyph_is_invisible(glyph) &&
!glyph_is_monster(glyph)) { !glyph_is_monster(glyph)) {
(void)use_pick_axe2(uwep); (void)use_pick_axe2(uwep);
return; return;
} }
}
/* about to become known empty -- remove 'I' if present */
unmap_object(x, y);
if (boulder) map_object(boulder, TRUE);
newsym(x, y);
glyph = glyph_at(x, y); /* might have just changed */
if (boulder) if (boulder)
Strcpy(buf, ansimpleoname(boulder)); Strcpy(buf, ansimpleoname(boulder));
else if (solid && glyph_is_cmap(glyph)) else if (Underwater && !is_pool(x, y))
Strcpy(buf, the(defsyms[glyph_to_cmap(glyph)].explanation)); /* Underwater, targetting non-water; the map just shows blank
else if (!Underwater) because you don't see remembered terrain while underwater;
Strcpy(buf, "thin air"); although the hero can attack an adjacent monster this way,
else if (is_pool(x, y)) assume he can't reach out far enough to distinguish terrain */
Strcpy(buf, "empty water"); Sprintf(buf, (Is_waterlevel(&u.uz) && levl[x][y].typ == AIR) ?
else /* Underwater, targetting non-water */ "an air bubble" : "nothing");
Sprintf(buf, "a vacant spot on the %s", surface(x,y)); else if (solid)
/* glyph might indicate unseen terrain if hero is blind;
unlike searching, this won't reveal what that terrain is
(except for solid rock, where the glyph would otherwise
yield ludicrous "dark part of a room") */
Strcpy(buf, (levl[x][y].typ == STONE) ? "solid rock" :
glyph_is_cmap(glyph) ?
the(defsyms[glyph_to_cmap(glyph)].explanation) :
(const char *)"an unknown obstacle");
/* note: 'solid' is misleadingly named and catches pools
of water and lava as well as rock and walls */
else
Strcpy(buf, "thin air");
You("%s%s %s.", You("%s%s %s.",
!(boulder || solid) ? "" : !(boulder || solid) ? "" : !explo ? "harmlessly " : "futilely ",
!explo ? "harmlessly " : "futilely ",
explo ? "explode at" : "attack", explo ? "explode at" : "attack",
buf); buf);
unmap_object(x, y); /* known empty -- remove 'I' if present */
if (boulder) map_object(boulder, TRUE);
newsym(x, y);
nomul(0); nomul(0);
if (explo) { if (explo) {
wake_nearby(); wake_nearby();
+5 -1
View File
@@ -1,4 +1,4 @@
/* NetHack 3.5 objnam.c $NHDT-Date: 1426470349 2015/03/16 01:45:49 $ $NHDT-Branch: derek-farming $:$NHDT-Revision: 1.108 $ */ /* NetHack 3.5 objnam.c $NHDT-Date: 1429413519 2015/04/19 03:18:39 $ $NHDT-Branch: master $:$NHDT-Revision: 1.128 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -567,6 +567,10 @@ struct obj *obj;
!objects[otyp].oc_uses_known; !objects[otyp].oc_uses_known;
bareobj.quan = 1L; /* don't want plural */ bareobj.quan = 1L; /* don't want plural */
bareobj.corpsenm = NON_PM; /* suppress statue and figurine details */ bareobj.corpsenm = NON_PM; /* suppress statue and figurine details */
/* but suppressing fruit details leads to "bad fruit #0"
[perhaps we should force "slime mold" rather than use xname?] */
if (obj->otyp == SLIME_MOLD) bareobj.spe = obj->spe;
bufp = distant_name(&bareobj, xname); /* xname(&bareobj) */ bufp = distant_name(&bareobj, xname); /* xname(&bareobj) */
if (!strncmp(bufp, "uncursed ", 9)) bufp += 9; /* Role_if(PM_PRIEST) */ if (!strncmp(bufp, "uncursed ", 9)) bufp += 9; /* Role_if(PM_PRIEST) */
+2 -3
View File
@@ -1,4 +1,4 @@
/* NetHack 3.5 pager.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ /* NetHack 3.5 pager.c $NHDT-Date: 1429408230 2015/04/19 01:50:30 $ $NHDT-Branch: master $:$NHDT-Revision: 1.62 $ */
/* NetHack 3.5 pager.c $Date: 2012/01/15 09:27:06 $ $Revision: 1.41 $ */ /* NetHack 3.5 pager.c $Date: 2012/01/15 09:27:06 $ $Revision: 1.41 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -273,8 +273,7 @@ lookat(x, y, buf, monbuf)
Strcpy(buf, Is_airlevel(&u.uz) ? "cloudy area" : "fog/vapor cloud"); Strcpy(buf, Is_airlevel(&u.uz) ? "cloudy area" : "fog/vapor cloud");
break; break;
default: default:
if (glyph_is_cmap(glyph)) Strcpy(buf,defsyms[glyph_to_cmap(glyph)].explanation);
Strcpy(buf,defsyms[glyph_to_cmap(glyph)].explanation);
break; break;
} }
+2 -2
View File
@@ -13,7 +13,7 @@
/* +-------------------------------------------------------------------+ */ /* +-------------------------------------------------------------------+ */
/* /*
* $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ * $NHDT-Date: 1429464661 2015/04/19 17:31:01 $ $NHDT-Branch: master $:$NHDT-Revision: 1.2 $
* $Date: 2002/01/05 21:06:02 $ $Revision: 1.1 $ * $Date: 2002/01/05 21:06:02 $ $Revision: 1.1 $
*/ */
@@ -71,7 +71,7 @@ static void FDECL(ReadTileStrip, (FILE *fd, int len));
/* These should be in gif.h, but there isn't one. */ /* These should be in gif.h, but there isn't one. */
boolean FDECL(fopen_gif_file, (const char *, const char *)); boolean FDECL(fopen_gif_file, (const char *, const char *));
boolean FDECL(read_gif_tile, (pixel(*)[])); boolean FDECL(read_gif_tile, (pixel(*)[TILE_X]));
int NDECL(fclose_gif_file); int NDECL(fclose_gif_file);
static int static int
+12 -1
View File
@@ -12,8 +12,19 @@ K = (204, 79, 0)
L = (255, 182, 145) L = (255, 182, 145)
M = (71, 108, 108) M = (71, 108, 108)
N = (255, 255, 255) N = (255, 255, 255)
O = (218, 218, 182) O = (215, 215, 215)
P = (108, 145, 182) P = (108, 145, 182)
Q = (18, 18, 18)
R = (54, 54, 54)
S = (73, 73, 73)
T = (82, 82, 82)
U = (71, 108, 108)
V = (104, 104, 104)
W = (131, 131, 131)
X = (140, 140, 140)
Y = (149, 149, 149)
Z = (195, 195, 195)
# tile 0 (giant ant) # tile 0 (giant ant)
{ {
MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM
+12 -1
View File
@@ -12,8 +12,19 @@ K = (204, 79, 0)
L = (255, 182, 145) L = (255, 182, 145)
M = (71, 108, 108) M = (71, 108, 108)
N = (255, 255, 255) N = (255, 255, 255)
O = (218, 218, 182) O = (215, 215, 215)
P = (108, 145, 182) P = (108, 145, 182)
Q = (18, 18, 18)
R = (54, 54, 54)
S = (73, 73, 73)
T = (82, 82, 82)
U = (71, 108, 108)
V = (104, 104, 104)
W = (131, 131, 131)
X = (140, 140, 140)
Y = (149, 149, 149)
Z = (195, 195, 195)
# tile 0 (strange object) # tile 0 (strange object)
{ {
MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM
+12 -1
View File
@@ -12,8 +12,19 @@ K = (204, 79, 0)
L = (255, 182, 145) L = (255, 182, 145)
M = (71, 108, 108) M = (71, 108, 108)
N = (255, 255, 255) N = (255, 255, 255)
O = (218, 218, 182) O = (215, 215, 215)
P = (108, 145, 182) P = (108, 145, 182)
Q = (18, 18, 18)
R = (54, 54, 54)
S = (73, 73, 73)
T = (82, 82, 82)
U = (71, 108, 108)
V = (104, 104, 104)
W = (131, 131, 131)
X = (140, 140, 140)
Y = (149, 149, 149)
Z = (195, 195, 195)
# tile 0 (dark part of a room) # tile 0 (dark part of a room)
{ {
AAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAA
+35 -16
View File
@@ -1,6 +1,4 @@
/* NetHack 3.5 tile2bmp.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ /* NetHack 3.5 tile2bmp.c $NHDT-Date: 1429464667 2015/04/19 17:31:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
/* NetHack 3.5 tile2bmp.c $Date: 2009/05/06 10:59:00 $ $Revision: 1.6 $ */
/* SCCS Id: @(#)tile2bmp.c 3.5 2002/03/14 */
/* Copyright (c) NetHack PC Development Team 1995 */ /* Copyright (c) NetHack PC Development Team 1995 */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -8,6 +6,7 @@
* Edit History: * Edit History:
* *
* Initial Creation M.Allison 1994/01/11 * Initial Creation M.Allison 1994/01/11
* 256 colour bmp and statue support M.Allison 2015/04/19
* *
*/ */
@@ -19,27 +18,29 @@
#include "win32api.h" #include "win32api.h"
#endif #endif
/* #define COLORS_IN_USE MAXCOLORMAPSIZE /* 256 colors */
#if (TILE_X==32) #if (TILE_X==32)
#define COLORS_IN_USE 256 #define COLORS_IN_USE 256
#else #else
#define COLORS_IN_USE 16 /* 16 colors */ /*#define COLORS_IN_USE 16 */ /* 16 colors */
#define COLORS_IN_USE 256 /* 256 colors */
#endif #endif
#define BITCOUNT 8 #define BITCOUNT 8
extern char *FDECL(tilename, (int, int)); extern char *FDECL(tilename, (int, int));
#define MAGICTILENO (340 + 440 + 231 + 340)
#if BITCOUNT==4 #if BITCOUNT==4
#define MAX_X 320 /* 2 per byte, 4 bits per pixel */ #define MAX_X 320 /* 2 per byte, 4 bits per pixel */
#define MAX_Y 480 #define MAX_Y 480
#else #else
# if (TILE_X==32) # if (TILE_X==32)
#define MAX_X (32 * 40) #define MAX_X (32 * 40)
#define MAX_Y 960 #define MAX_Y ((MAGICTILENO * 32) / 40) * 2
# else # else
#define MAX_X 640 /* 1 per byte, 8 bits per pixel */ #define MAX_X (16 * 40)
#define MAX_Y 480 #define MAX_Y ((MAGICTILENO * 16) / 40) * 2
# endif # endif
#endif #endif
@@ -119,7 +120,8 @@ struct tagBMP{
#if (TILE_X==32) #if (TILE_X==32)
#define RGBQUAD_COUNT 256 #define RGBQUAD_COUNT 256
#else #else
#define RGBQUAD_COUNT 16 /*#define RGBQUAD_COUNT 16 */
#define RGBQUAD_COUNT 256
#endif #endif
RGBQUAD bmaColors[RGBQUAD_COUNT]; RGBQUAD bmaColors[RGBQUAD_COUNT];
#endif #endif
@@ -146,11 +148,11 @@ char *tilefiles[] = {
#if (TILE_X == 32) #if (TILE_X == 32)
"../win/share/mon32.txt", "../win/share/mon32.txt",
"../win/share/obj32.txt", "../win/share/obj32.txt",
"../win/share/oth32.txt" "../win/share/oth32.txt",
#else #else
"../win/share/monsters.txt", "../win/share/monsters.txt",
"../win/share/objects.txt", "../win/share/objects.txt",
"../win/share/other.txt" "../win/share/other.txt",
#endif #endif
}; };
@@ -160,6 +162,7 @@ int max_tiles_in_row = 40;
int tiles_in_row; int tiles_in_row;
int filenum; int filenum;
int initflag; int initflag;
int pass;
int yoffset,xoffset; int yoffset,xoffset;
char bmpname[128]; char bmpname[128];
FILE *fp; FILE *fp;
@@ -190,12 +193,14 @@ char *argv[];
xoffset = yoffset = 0; xoffset = yoffset = 0;
initflag = 0; initflag = 0;
filenum = 0; filenum = 0;
pass = 0;
fp = fopen(bmpname,"wb"); fp = fopen(bmpname,"wb");
if (!fp) { if (!fp) {
printf("Error creating tile file %s, aborting.\n",bmpname); printf("Error creating tile file %s, aborting.\n",bmpname);
exit(1); exit(1);
} }
while (filenum < (sizeof(tilefiles) / sizeof(char *))) { while (pass < 4) {
filenum =pass % (sizeof(tilefiles) / sizeof(char *));
if (!fopen_text_file(tilefiles[filenum], RDTMODE)) { if (!fopen_text_file(tilefiles[filenum], RDTMODE)) {
Fprintf(stderr, Fprintf(stderr,
"usage: tile2bmp (from the util directory)\n"); "usage: tile2bmp (from the util directory)\n");
@@ -235,7 +240,7 @@ char *argv[];
} }
} }
(void) fclose_text_file(); (void) fclose_text_file();
++filenum; ++pass;
} }
fwrite(&bmp, sizeof(bmp), 1, fp); fwrite(&bmp, sizeof(bmp), 1, fp);
fclose(fp); fclose(fp);
@@ -303,18 +308,23 @@ BITMAPINFOHEADER *pbmih;
#endif #endif
#if (TILE_X==16) #if (TILE_X==16)
pbmih->biSizeImage = lelong(0); /* pbmih->biSizeImage = lelong(0); */
pbmih->biSizeImage = lelong(((w * cClrBits +31) & ~31) /8 * h);
#else #else
pbmih->biSizeImage = lelong(((w * cClrBits +31) & ~31) /8 * h); pbmih->biSizeImage = lelong(((w * cClrBits +31) & ~31) /8 * h);
#endif #endif
pbmih->biClrImportant = (DWORD)0; pbmih->biClrImportant = (DWORD)0;
} }
static int graymappings[] = {
/*A B C D E F G H I J K L M N O P*/
0, 16, 17, 18, 19, 12, 21, 22, 23, 24, 25, 14, 12, 13, 13, 13};
static void static void
build_bmptile(pixels) build_bmptile(pixels)
pixel (*pixels)[TILE_X]; pixel (*pixels)[TILE_X];
{ {
int cur_x, cur_y, cur_color; int cur_x, cur_y, cur_color, apply_color;
int x,y; int x,y;
for (cur_y = 0; cur_y < TILE_Y; cur_y++) { for (cur_y = 0; cur_y < TILE_Y; cur_y++) {
@@ -328,6 +338,15 @@ pixel (*pixels)[TILE_X];
if (cur_color >= num_colors) if (cur_color >= num_colors)
Fprintf(stderr, "color not in colormap!\n"); Fprintf(stderr, "color not in colormap!\n");
y = (MAX_Y - 1) - (cur_y + yoffset); y = (MAX_Y - 1) - (cur_y + yoffset);
apply_color = cur_color;
if (pass == 3) {
/* map to shades of gray */
if (cur_color > (SIZE(graymappings)-1))
Fprintf(stderr, "Gray mapping issue %d %d.\n",
cur_color, SIZE(graymappings)-1);
else
apply_color = graymappings[cur_color];
}
#if BITCOUNT==4 #if BITCOUNT==4
x = (cur_x / 2) + xoffset; x = (cur_x / 2) + xoffset;
bmp.packtile[y][x] = cur_x%2 ? bmp.packtile[y][x] = cur_x%2 ?
@@ -335,7 +354,7 @@ pixel (*pixels)[TILE_X];
(uchar)(cur_color<<4); (uchar)(cur_color<<4);
#else #else
x = cur_x + xoffset; x = cur_x + xoffset;
bmp.packtile[y][x] = (uchar)cur_color; bmp.packtile[y][x] = (uchar)apply_color;
#endif #endif
} }
} }
+20 -8
View File
@@ -1,4 +1,4 @@
/* NetHack 3.5 tilemap.c $NHDT-Date: 1425082379 2015/02/28 00:12:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */ /* NetHack 3.5 tilemap.c $NHDT-Date: 1429464668 2015/04/19 17:31:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.18 $ */
/* SCCS Id: @(#)tilemap.c 3.5 2000/06/04 */ /* SCCS Id: @(#)tilemap.c 3.5 2000/06/04 */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -237,7 +237,7 @@ int set, entry;
#endif #endif
short tilemap[MAX_GLYPH]; short tilemap[MAX_GLYPH];
int lastmontile, lastobjtile, lastothtile; int lastmontile, lastobjtile, lastothtile, laststatuetile;
/* Number of tiles for invisible monsters */ /* Number of tiles for invisible monsters */
#define NUM_INVIS_TILES 1 #define NUM_INVIS_TILES 1
@@ -356,13 +356,25 @@ init_tilemap()
tilenum++; tilenum++;
} }
/* statue patch: statues still use the same glyph as in vanilla */
for ( i = 0; i < NUMMONS; i++) {
tilemap[GLYPH_STATUE_OFF+i] = tilemap[GLYPH_OBJ_OFF+STATUE];
}
lastothtile = tilenum - 1; lastothtile = tilenum - 1;
/* skip over the substitutes to get to the grayscale statues */
for (i = 0; i < SIZE(substitutes); i++) {
tilenum += substitutes[i].last_glyph - substitutes[i].first_glyph + 1;
}
/* statue patch: statues look more like the monster */
condnum = 0; /* doing monsters again, so reset */
for (i = 0; i < NUMMONS; i++) {
tilemap[GLYPH_STATUE_OFF+i] = tilenum;
tilenum++;
while (conditionals[condnum].sequence == MON_GLYPH &&
conditionals[condnum].predecessor == i) {
condnum++;
tilenum++;
}
}
laststatuetile = tilenum - 1;
} }
const char *prolog[] = { const char *prolog[] = {