Inform - Support - Patches

About Patches  


DM4 Errata  

Issue L60709

Implementing a clock
Submitted by: Torbjörn Andersson     Appeared in: Library 6/7 or before     Fixed in: Library 6/11

Suppose you want to put a clock in your game. The simplest method would probably be to use the SetTime() function provided by the Inform library, but there is a problem with this. The status line will start displaying hours and minutes instead of score and moves but it will still use the score/moves layout.

This is because DrawStatusLine() - which draws the status line -- checks a header flag to see which layout to use, while DisplayStatus() -- which decides what values to print in the status line - checks the value of the_time.


Changing the if-statement in DisplayStatus() from

  if (the_time==NULL)


  if ((0->1)&2 == 0)

should take care of this.

Last updated 17 April 2013. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Roger Firth.