Added set-game-cycle!

This commit is contained in:
jsalmon3 2002-09-03 01:21:48 +00:00
parent 829632477b
commit dbf517d265
3 changed files with 42 additions and 5 deletions
doc/scripts
src/stratagus

View file

@ -80,6 +80,7 @@
<A HREF="#reset-keystroke-help">reset-keystroke-help</A>
<A HREF="#selection">selection</A>
<A HREF="#set-diplomacy!">set-diplomacy!</A>
<A HREF="#set-game-cycle!">set-game-cycle!</A>
<A HREF="#set-group-id!">set-group-id!</A>
<A HREF="#set-player-resources!">set-player-resources!</A>
<A HREF="#set-this-player!">set-this-player!</A>
@ -561,7 +562,7 @@ Everything around the game.
<H4>Description</H4>
.
Returns the current game cycle.
<H4>Syntax</H4>
@ -581,9 +582,7 @@ Everything around the game.
<P>.
<H4>Used</H4>
<A HREF="../../data/ccl/wc2.ccl"> $LIBARYPATH/ccl/wc2.ccl </A>
<H4>Not Used</H4>
<A NAME="get-freecraft-home-path"></A>
<H3>get-freecraft-home-path</H3>
@ -1165,6 +1164,33 @@ Everything around the game.
<A HREF="../../data/ccl/wc2.ccl"> $LIBARYPATH/ccl/wc2.ccl </A>
<A NAME="set-game-cycle!"></A>
<H3>set-game-cycle!</H3>
<H4>Description</H4>
Set the current game cycle number.
<H4>Syntax</H4>
<CODE>(set-game-cycle! cycle)</CODE>
<DL>
<DT>cycle</DT>
<DD>The game cycle number.
</DD>
</DL>
<H4>Example</H4>
<PRE>
(set-game-cycle! 100)
</PRE>
<P>Set the game cycle number to 100.
<H4>Not Used</H4>
<A NAME="set-group-id!"></A>
<H3>set-group-id!</H3>

View file

@ -372,6 +372,8 @@
<DD></DD>
<DT><A HREF="ui.html#set-game-cursor!">set-game-cursor!</A></DT>
<DD></DD>
<DT><A HREF="game.html#set-game-cycle!">set-game-cycle!</A></DT>
<DD></DD>
<DT><A HREF="sound.html#set-global-sound-range!">set-global-sound-range!</A></DT>
<DD></DD>
<DT><A HREF="config.html#set-goldmine-depleted!">set-goldmine-depleted!</A></DT>

View file

@ -108,6 +108,15 @@ local SCM CclGameCycle(void)
return gh_int2scm(GameCycle);
}
/**
** Set the freecraft game-cycle
*/
local SCM CclSetGameCycle(SCM cycle)
{
GameCycle=gh_scm2int(cycle);
return SCM_UNSPECIFIED;
}
/**
** Enable/disable Showing the tips at the start of a level.
**
@ -442,7 +451,7 @@ global void InitCcl(void)
gh_new_procedure0_0("library-path",CclFreeCraftLibraryPath);
gh_new_procedure0_0("game-cycle",CclGameCycle);
gh_new_procedure1_0("set-game-cycle!",CclSetGameCycle);
gh_new_procedure1_0("set-show-tips!",CclSetShowTips);
gh_new_procedure1_0("add-tip",CclAddTip);