get rid of NetHack macro conflict with curses routine delay_output()

This commit is contained in:
nhmall
2023-04-21 08:25:53 -04:00
parent 71decafefd
commit 826ce951e7
20 changed files with 46 additions and 51 deletions
+2 -2
View File
@@ -122,7 +122,7 @@ mkcavearea(boolean rockit)
}
flush_screen(1); /* make sure the new glyphs shows up */
delay_output();
nh_delay_output();
}
if (!rockit && levl[u.ux][u.uy].typ == CORR) {
@@ -1492,7 +1492,7 @@ zap_dig(void)
break;
room = &levl[zx][zy];
tmp_at(zx, zy);
delay_output(); /* wait a little bit */
nh_delay_output(); /* wait a little bit */
if (pitdig) { /* we are already in a pit if this is true */
coord cc;
+4 -4
View File
@@ -1032,7 +1032,7 @@ shieldeff(coordxy x, coordxy y)
for (i = 0; i < SHIELD_COUNT; i++) {
show_glyph(x, y, cmap_to_glyph(shield_static[i]));
flush_screen(1); /* make sure the glyph shows up */
delay_output();
nh_delay_output();
}
newsym(x, y); /* restore the old information */
}
@@ -1050,7 +1050,7 @@ tether_glyph(coordxy x, coordxy y)
/*
* tmp_at()
*
* Temporarily place glyphs on the screen. Do not call delay_output(). It
* Temporarily place glyphs on the screen. Do not call nh_delay_output(). It
* is up to the caller to decide if it wants to wait [presently, everyone
* but explode() wants to delay].
*
@@ -1145,7 +1145,7 @@ tmp_at(coordxy x, coordxy y)
show_glyph(tglyph->saved[i - 1].x,
tglyph->saved[i - 1].y, tglyph->glyph);
flush_screen(0); /* make sure it shows up */
delay_output();
nh_delay_output();
}
tglyph->sidx = 1;
}
@@ -1229,7 +1229,7 @@ flash_glyph_at(coordxy x, coordxy y, int tg, int rpt)
for (i = 0; i < rpt; i++) {
show_glyph(x, y, glyph[i % 2]);
flush_screen(1);
delay_output();
nh_delay_output();
}
}
+4 -4
View File
@@ -971,7 +971,7 @@ hurtle_step(genericptr_t arg, coordxy x, coordxy y)
if (--*range < 0) /* make sure our range never goes negative */
*range = 0;
if (*range != 0)
delay_output();
nh_delay_output();
return TRUE;
}
@@ -1014,7 +1014,7 @@ mhurtle_step(genericptr_t arg, coordxy x, coordxy y)
vision_recalc(0); /* new location => different lines of sight */
}
flush_screen(1);
delay_output();
nh_delay_output();
set_apparxy(mon);
if (is_waterwall(x, y))
return FALSE;
@@ -1411,7 +1411,7 @@ sho_obj_return_to_u(struct obj *obj)
tmp_at(DISP_FLASH, obj_to_glyph(obj, rn2_on_display_rng));
while (isok(x,y) && (x != u.ux || y != u.uy)) {
tmp_at(x, y);
delay_output();
nh_delay_output();
x -= u.dx;
y -= u.dy;
}
@@ -1707,7 +1707,7 @@ throwit(struct obj *obj,
|| obj->oclass == VENOM_CLASS) {
tmp_at(DISP_FLASH, obj_to_glyph(obj, rn2_on_display_rng));
tmp_at(gb.bhitpos.x, gb.bhitpos.y);
delay_output();
nh_delay_output();
tmp_at(DISP_END, 0);
breakmsg(obj, cansee(gb.bhitpos.x, gb.bhitpos.y));
breakobj(obj, gb.bhitpos.x, gb.bhitpos.y, TRUE, TRUE);
+4 -4
View File
@@ -415,7 +415,7 @@ explode(
cmap_to_glyph(shield_static[k]));
}
curs_on_u(); /* will flush screen and output */
delay_output();
nh_delay_output();
}
/* Cover last shield glyph with blast symbol. */
@@ -430,8 +430,8 @@ explode(
}
} else { /* delay a little bit. */
delay_output();
delay_output();
nh_delay_output();
nh_delay_output();
}
tmp_at(DISP_END, 0); /* clear the explosion */
@@ -871,7 +871,7 @@ scatter(coordxy sx, coordxy sy, /* location of objects to scatter */
} else {
if (scflags & VIS_EFFECTS) {
/* tmp_at(gb.bhitpos.x, gb.bhitpos.y); */
/* delay_output(); */
/* nh_delay_output(); */
}
}
stmp->ox = gb.bhitpos.x;
+13 -13
View File
@@ -1322,10 +1322,10 @@ findtravelpath(int mode)
for (i = 0; i < nn; ++i) {
tmp_at(travelstepx[1 - set][i], travelstepy[1 - set][i]);
}
delay_output();
nh_delay_output();
if (flags.runmode == RUN_CRAWL) {
delay_output();
delay_output();
nh_delay_output();
nh_delay_output();
}
tmp_at(DISP_END, 0);
}
@@ -1381,12 +1381,12 @@ findtravelpath(int mode)
/* Use of warning glyph is arbitrary. It stands out. */
tmp_at(DISP_ALL, warning_to_glyph(2));
tmp_at(px, py);
delay_output();
nh_delay_output();
if (flags.runmode == RUN_CRAWL) {
delay_output();
delay_output();
delay_output();
delay_output();
nh_delay_output();
nh_delay_output();
nh_delay_output();
nh_delay_output();
}
tmp_at(DISP_END, 0);
}
@@ -2623,12 +2623,12 @@ runmode_delay_output(void)
/* moveloop() suppresses time_botl when running */
iflags.time_botl = flags.time;
curs_on_u();
delay_output();
nh_delay_output();
if (flags.runmode == RUN_CRAWL) {
delay_output();
delay_output();
delay_output();
delay_output();
nh_delay_output();
nh_delay_output();
nh_delay_output();
nh_delay_output();
}
}
}
+1 -1
View File
@@ -282,7 +282,7 @@ show_transient_light(struct obj *obj, coordxy x, coordxy y)
}
if (obj) { /* take thrown/kicked candle or lamp off the map */
delay_output();
nh_delay_output();
remove_object(obj);
}
}
+2 -2
View File
@@ -343,7 +343,7 @@ md_rush(struct monst *md,
place_monster(md, fx, fy); /* put md down */
newsym(fx, fy); /* see it */
flush_screen(0); /* make sure md shows up */
delay_output(); /* wait a little bit */
nh_delay_output(); /* wait a little bit */
/* Remove md from the dungeon. Restore original mon, if necessary. */
remove_monster(fx, fy);
@@ -380,7 +380,7 @@ md_rush(struct monst *md,
place_monster(md, fx, fy); /* place at final spot */
newsym(fx, fy);
flush_screen(0);
delay_output(); /* wait a little bit */
nh_delay_output(); /* wait a little bit */
return TRUE;
}
+1 -1
View File
@@ -2001,7 +2001,7 @@ mkinvokearea(void)
}
flush_screen(1); /* make sure the new glyphs shows up */
delay_output();
nh_delay_output();
}
You("are standing at the top of a stairwell leading down!");
+2 -2
View File
@@ -757,10 +757,10 @@ m_throw(
break;
}
tmp_at(gb.bhitpos.x, gb.bhitpos.y);
delay_output();
nh_delay_output();
}
tmp_at(gb.bhitpos.x, gb.bhitpos.y);
delay_output();
nh_delay_output();
tmp_at(DISP_END, 0);
gm.mesg_given = 0; /* reset */
+1 -1
View File
@@ -3680,7 +3680,7 @@ shkcatch(
the(xname(obj)));
if (!canspotmon(shkp))
map_invisible(x, y);
delay_output();
nh_delay_output();
mark_synch();
}
subfrombill(obj, shkp);
+1 -1
View File
@@ -2943,7 +2943,7 @@ launch_obj(
/* dstage@u.washington.edu -- Delay only if hero sees it */
if (cansee(gb.bhitpos.x, gb.bhitpos.y))
while (tmp-- > 0)
delay_output();
nh_delay_output();
gb.bhitpos.x += dx;
gb.bhitpos.y += dy;
+2 -2
View File
@@ -4605,8 +4605,8 @@ start_engulf(struct monst *mdef)
You("%s %s%s!",
u_digest ? "swallow" : u_enfold ? "enclose" : "engulf",
mon_nam(mdef), u_digest ? " whole" : "");
delay_output();
delay_output();
nh_delay_output();
nh_delay_output();
}
static void
+1 -1
View File
@@ -562,7 +562,7 @@ static struct window_procs hup_procs = {
hup_int_ndecl, /* doprev_message */
hup_yn_function, hup_getlin, hup_int_ndecl, /* get_ext_cmd */
hup_void_fdecl_int, /* number_pad */
hup_void_ndecl, /* delay_output */
hup_void_ndecl, /* nh_delay_output */
#ifdef CHANGE_COLOR
hup_change_color,
#ifdef MAC
+3 -3
View File
@@ -3772,7 +3772,7 @@ bhit(
newsym(x, y);
}
tmp_at(gb.bhitpos.x, gb.bhitpos.y);
delay_output();
nh_delay_output();
/* kicked objects fall in pools */
if ((weapon == KICKED_WEAPON)
&& (is_pool(gb.bhitpos.x, gb.bhitpos.y)
@@ -3891,7 +3891,7 @@ boomhit(struct obj *obj, coordxy dx, coordxy dy)
}
}
tmp_at(gb.bhitpos.x, gb.bhitpos.y);
delay_output();
nh_delay_output();
if (IS_SINK(levl[gb.bhitpos.x][gb.bhitpos.y].typ)) {
Soundeffect(se_boomerang_klonk, 75);
if (!Deaf)
@@ -4467,7 +4467,7 @@ dobuzz(
if (ZAP_POS(levl[sx][sy].typ)
|| (isok(lsx, lsy) && cansee(lsx, lsy)))
tmp_at(sx, sy);
delay_output(); /* wait a little */
nh_delay_output(); /* wait a little */
}
/* hit() and miss() need gb.bhitpos to match the target */