Much weirdness. I thought it might be the library I was on so I tried with 6.12.6, 6.12.5 and 6.12.1. The problem happens with each. Then I thought it be the compiler version of Inform 6. So I went from 6.43 to 6.42 but I have the same issue.
I tried, in all cases, compiling with Glulx and compiling to z5. It actually happens with any use of time. For example, I replaced the DrawStatusLine
with the following (it’s ugly; I was just doing the minimal to get my own time in place):
[ DrawStatusLine width posa posb posc posd pose;
#Ifdef TARGET_GLULX;
if (gg_statuswin == 0)
return;
#Endif;
if (location == nothing || parent(player) == nothing)
return;
StatusLineHeight(gg_statuswin_size);
MoveCursor(1, 1);
width = ScreenWidth();
posa = width-26; ! For standard move/score display.
posb = width-13;
posc = width-5;
posd = width-19; ! For time display.
pose = width-14;
spaces width;
MoveCursor(1, 2);
if (location == thedark) {
print (name) location;
}
else {
FindVisibilityLevels();
if (visibility_ceiling == location)
print (name) location;
else
print (The) visibility_ceiling;
}
if (sys_statusline_flag) {
if (width > 29) {
if (width > 39)
MoveCursor(1, posd);
else
MoveCursor(1, pose);
print (string) TIME__TX;
LanguageTimeOfDay(sline1, sline2);
} else
jump DSLContinue;
} else {
if (width > 66) {
#Ifndef NO_SCORE;
MoveCursor(1, posa);
! print (string) SCORE__TX, sline1;
! print (PrintTime) the_time;
#Endif;
MoveCursor(1, posb);
! print (string) MOVES__TX, sline2;
print (PrintTime) the_time;
}
if (width > 53 && width <= 66) {
MoveCursor(1, posb);
#Ifdef NO_SCORE;
! print (string) MOVES__TX, sline2;
! print (PrintTime) the_time;
#Ifnot;
! print sline1, "/", sline2;
print (PrintTime) the_time;
#Endif;
}
if (width < 53) {
MoveCursor(1, posc);
#Ifdef NO_SCORE;
! print (string) MOVES_S__TX, sline2;
! print (PrintTime) the_time;
#Ifnot;
! print sline1, "/", sline2;
print (PrintTime) the_time;
#Endif;
}
}
.DSLContinue;
MainWindow(); ! set_window
];
The PrintTime
is a function I have defined that looks like this:
[PrintTime t;
print (t/720), ":", ((t/12)%60)/10, (t/12)%10, ":", ((t%12)/2);
if ((t%2) == 0)
print "0";
else
print "5";
if (t/(720*12) == 0)
print " am";
else
print " pm";
];
When I run that, the time does show up differently (0:00:05 am) but similarly doesn’t increment at all. The same applies if I try this with a zcode version:
[ DrawStatusLine width pos;
! @split_window 0;
! return;
@split_window 1;
@set_window 1;
@set_cursor 1 1;
style reverse;
width = 0->33;
pos = width-20;
spaces (width);
@set_cursor 1 2;
PrintShortName(location);
@set_cursor 1 pos;
print (PrintTime) the_time;
@set_cursor 1 1;
style roman;
@set_window 0;
];