Merge branch 'master' into win32-x64-working
This commit is contained in:
@@ -900,6 +900,7 @@ tmp_at(x, y)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* do it */
|
default: /* do it */
|
||||||
|
if (!isok(x,y)) break;
|
||||||
if (tglyph->style == DISP_BEAM || tglyph->style == DISP_ALL) {
|
if (tglyph->style == DISP_BEAM || tglyph->style == DISP_ALL) {
|
||||||
if (tglyph->style != DISP_ALL && !cansee(x,y)) break;
|
if (tglyph->style != DISP_ALL && !cansee(x,y)) break;
|
||||||
if (tglyph->sidx >= TMP_AT_MAX_GLYPHS) break; /* too many locations */
|
if (tglyph->sidx >= TMP_AT_MAX_GLYPHS) break; /* too many locations */
|
||||||
|
|||||||
@@ -783,6 +783,7 @@ time_t date;
|
|||||||
Sprintf(datestr, "%04ld%02d%02d%02d%02d%02d",
|
Sprintf(datestr, "%04ld%02d%02d%02d%02d%02d",
|
||||||
datenum, lt->tm_mon + 1, lt->tm_mday,
|
datenum, lt->tm_mon + 1, lt->tm_mday,
|
||||||
lt->tm_hour, lt->tm_min, lt->tm_sec);
|
lt->tm_hour, lt->tm_min, lt->tm_sec);
|
||||||
|
debugpline1("yyyymmddhhmmss() produced date string %s", datestr);
|
||||||
return(datestr);
|
return(datestr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -791,6 +792,7 @@ time_from_yyyymmddhhmmss(buf)
|
|||||||
char *buf;
|
char *buf;
|
||||||
{
|
{
|
||||||
int k;
|
int k;
|
||||||
|
time_t timeresult;
|
||||||
struct tm t, *lt;
|
struct tm t, *lt;
|
||||||
char *g, *p, y[5],mo[3],md[3],h[3],mi[3],s[3];
|
char *g, *p, y[5],mo[3],md[3],h[3],mi[3],s[3];
|
||||||
if (buf && strlen(buf) == 14) {
|
if (buf && strlen(buf) == 14) {
|
||||||
@@ -828,8 +830,13 @@ char *buf;
|
|||||||
t.tm_hour = atoi(h);
|
t.tm_hour = atoi(h);
|
||||||
t.tm_min = atoi(mi);
|
t.tm_min = atoi(mi);
|
||||||
t.tm_sec = atoi(s);
|
t.tm_sec = atoi(s);
|
||||||
return mktime(&t);
|
timeresult = mktime(&t);
|
||||||
}
|
}
|
||||||
|
if ((int)timeresult == -1)
|
||||||
|
debugpline1("time_from_yyyymmddhhmmss(%s) would have returned -1",
|
||||||
|
buf ? buf : "");
|
||||||
|
else
|
||||||
|
return timeresult;
|
||||||
}
|
}
|
||||||
return (time_t)0;
|
return (time_t)0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -692,6 +692,8 @@ doclose() /* try to close a door */
|
|||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isok(x,y)) goto nodoor;
|
||||||
|
|
||||||
if ((mtmp = m_at(x,y)) &&
|
if ((mtmp = m_at(x,y)) &&
|
||||||
mtmp->m_ap_type == M_AP_FURNITURE &&
|
mtmp->m_ap_type == M_AP_FURNITURE &&
|
||||||
(mtmp->mappearance == S_hcdoor ||
|
(mtmp->mappearance == S_hcdoor ||
|
||||||
@@ -723,8 +725,10 @@ doclose() /* try to close a door */
|
|||||||
pline_The("drawbridge is already closed.");
|
pline_The("drawbridge is already closed.");
|
||||||
else if (portcullis || door->typ == DRAWBRIDGE_DOWN)
|
else if (portcullis || door->typ == DRAWBRIDGE_DOWN)
|
||||||
There("is no obvious way to close the drawbridge.");
|
There("is no obvious way to close the drawbridge.");
|
||||||
else
|
else {
|
||||||
|
nodoor:
|
||||||
You("%s no door there.", Blind ? "feel" : "see");
|
You("%s no door there.", Blind ? "feel" : "see");
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ struct obj *obj; /* missile (or stack providing it) */
|
|||||||
tmp_at(bhitpos.x, bhitpos.y);
|
tmp_at(bhitpos.x, bhitpos.y);
|
||||||
delay_output();
|
delay_output();
|
||||||
}
|
}
|
||||||
tmp_at(bhitpos.x, bhitpos.y);
|
if (isok(bhitpos.x, bhitpos.y)) tmp_at(bhitpos.x, bhitpos.y);
|
||||||
delay_output();
|
delay_output();
|
||||||
tmp_at(DISP_END, 0);
|
tmp_at(DISP_END, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -707,7 +707,7 @@ menu_item **pick_list; /* return list of items picked */
|
|||||||
int how; /* type of query */
|
int how; /* type of query */
|
||||||
boolean FDECL((*allow), (OBJ_P));/* allow function */
|
boolean FDECL((*allow), (OBJ_P));/* allow function */
|
||||||
{
|
{
|
||||||
int i, n;
|
int i, n, actualn;
|
||||||
winid win;
|
winid win;
|
||||||
struct obj *curr, *last, fake_hero_object;
|
struct obj *curr, *last, fake_hero_object;
|
||||||
struct obj **oarray;
|
struct obj **oarray;
|
||||||
@@ -726,7 +726,7 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */
|
|||||||
last = curr;
|
last = curr;
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
actualn = n;
|
||||||
if (engulfer) {
|
if (engulfer) {
|
||||||
++n;
|
++n;
|
||||||
/* don't autoselect swallowed hero if it's the only choice */
|
/* don't autoselect swallowed hero if it's the only choice */
|
||||||
@@ -743,7 +743,7 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
oarray = objarr_init(n);
|
oarray = objarr_init(actualn);
|
||||||
/* Add objects to the array */
|
/* Add objects to the array */
|
||||||
i = 0;
|
i = 0;
|
||||||
for (curr = olist; curr; curr = FOLLOW(curr, qflags)) {
|
for (curr = olist; curr; curr = FOLLOW(curr, qflags)) {
|
||||||
@@ -766,7 +766,7 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */
|
|||||||
pack = flags.inv_order;
|
pack = flags.inv_order;
|
||||||
do {
|
do {
|
||||||
printed_type_name = FALSE;
|
printed_type_name = FALSE;
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < actualn; i++) {
|
||||||
curr = oarray[i];
|
curr = oarray[i];
|
||||||
if ((qflags & FEEL_COCKATRICE) && curr->otyp == CORPSE &&
|
if ((qflags & FEEL_COCKATRICE) && curr->otyp == CORPSE &&
|
||||||
will_feel_cockatrice(curr, FALSE)) {
|
will_feel_cockatrice(curr, FALSE)) {
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ newman()
|
|||||||
enmax = rounddiv((long)enmax * (long)rn1(4, 8), 10);
|
enmax = rounddiv((long)enmax * (long)rn1(4, 8), 10);
|
||||||
for (i = 0; (u.ulevel = i) < newlvl; i++) enmax += newpw();
|
for (i = 0; (u.ulevel = i) < newlvl; i++) enmax += newpw();
|
||||||
if (enmax < u.ulevel) enmax = u.ulevel;
|
if (enmax < u.ulevel) enmax = u.ulevel;
|
||||||
u.uen = rounddiv((long)u.uen * (long)enmax, u.uenmax);
|
u.uen = rounddiv((long)u.uen * (long)enmax, ((u.uenmax < 1) ? 1 : u.uenmax));
|
||||||
u.uenmax = enmax;
|
u.uenmax = enmax;
|
||||||
/* [should alignment record be tweaked too?] */
|
/* [should alignment record be tweaked too?] */
|
||||||
|
|
||||||
|
|||||||
@@ -3469,7 +3469,7 @@ drown()
|
|||||||
}
|
}
|
||||||
u.uinwater = 1;
|
u.uinwater = 1;
|
||||||
You("drown.");
|
You("drown.");
|
||||||
for (;;) {
|
for (i = 0; i < 5; i++) { /* arbitrary number of loops */
|
||||||
/* killer format and name are reconstructed every iteration
|
/* killer format and name are reconstructed every iteration
|
||||||
because lifesaving resets them */
|
because lifesaving resets them */
|
||||||
pool_of_water = waterbody_name(u.ux, u.uy);
|
pool_of_water = waterbody_name(u.ux, u.uy);
|
||||||
|
|||||||
Reference in New Issue
Block a user