Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 74fbd0eb33bb08f719b79951bc4e329e > files > 23

xconq-7.5.0-1.20050612.5mdv2009.1.i586.rpm

<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.39
     from ./hacking.texi on 12 June 2005 -->

<TITLE>Hacking Xconq - Progress Indication</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="hacking_1.html">first</A>, <A HREF="hacking_13.html">previous</A>, <A HREF="hacking_15.html">next</A>, <A HREF="hacking_35.html">last</A> section, <A HREF="hacking_toc.html">table of contents</A>.
<HR>


<H2><A NAME="SEC14" HREF="hacking_toc.html#SEC14">Progress Indication</A></H2>

<P>
Some synthesis methods are very slow, and become even slower when
creating large games, so the kernel will announce a slow process,
provide regular updates, and signal when the process is done.  The
interface should display this in some useful way.  In general, progress
should always be displayed, although one could postpone displaying
anything until after the first progress update, calculate an estimated
time to completion, and not display anything if that estimate is for
less than a few seconds.  However, this is probably unnecessary.

</P>

<UL>

<LI>

<CODE>void announce_read_progress()</CODE>

The kernel calls this regularly while reading game definitions.
Interfaces running on slow machines should use this to indicate that
everything is still working; for instance, the Mac interface animates a
special cursor that indicates reading is taking place.

<LI>

<CODE>void announce_lengthy_process(char *msg)</CODE>

The kernel calls this at the beginning of each synthesis.  The argument
is a readable string that the interface can show to players.

<LI>

<CODE>void announce_progress(int pctdone)</CODE>

The kernel may call this at milestones within a synthesis.
The number ranges from 0 to 100.

<LI>

<CODE>void finish_lengthy_process()</CODE>

The kernel calls this at the end of a synthesis.

</UL>

<HR>
Go to the <A HREF="hacking_1.html">first</A>, <A HREF="hacking_13.html">previous</A>, <A HREF="hacking_15.html">next</A>, <A HREF="hacking_35.html">last</A> section, <A HREF="hacking_toc.html">table of contents</A>.
</BODY>
</HTML>