mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-27 07:46:33 +00:00
279 lines
24 KiB
HTML
Executable file
279 lines
24 KiB
HTML
Executable file
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
|
|
<meta name="generator" content="ZealOS V1.07">
|
|
<style type="text/css">
|
|
body {background-color:#1f1f1f;}
|
|
.cF0{color:#e3e3e3;background-color:#1f1f1f;}
|
|
.cF1{color:#4f84a6;background-color:#1f1f1f;}
|
|
.cF2{color:#73a255;background-color:#1f1f1f;}
|
|
.cF3{color:#297582;background-color:#1f1f1f;}
|
|
.cF4{color:#b34f4b;background-color:#1f1f1f;}
|
|
.cF5{color:#8a52c3;background-color:#1f1f1f;}
|
|
.cF6{color:#b7822f;background-color:#1f1f1f;}
|
|
.cF7{color:#444444;background-color:#1f1f1f;}
|
|
.cF8{color:#6d6d6d;background-color:#1f1f1f;}
|
|
.cF9{color:#94bfde;background-color:#1f1f1f;}
|
|
.cFA{color:#a1ce97;background-color:#1f1f1f;}
|
|
.cFB{color:#6db4be;background-color:#1f1f1f;}
|
|
.cFC{color:#e88e88;background-color:#1f1f1f;}
|
|
.cFD{color:#ca94e8;background-color:#1f1f1f;}
|
|
.cFE{color:#d4b475;background-color:#1f1f1f;}
|
|
.cFF{color:#1f1f1f;background-color:#1f1f1f;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<pre style="font-family:monospace;font-size:12pt">
|
|
<a name="l1"></a><span class=cF1>U0</span><span class=cF0> AnimationDelaySet()
|
|
<a name="l2"></a>{
|
|
<a name="l3"></a> animation_delay = </span><span class=cF5>PopUpRangeF64</span><span class=cF0>(</span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>100</span><span class=cF0>, </span><span class=cFE>25</span><span class=cF0>, </span><span class=cF6>"%3f% %%"</span><span class=cF0>, </span><span class=cF6>"Animation Delay\n"</span><span class=cF0>)/</span><span class=cFE>100</span><span class=cF0>;
|
|
<a name="l4"></a>}
|
|
<a name="l5"></a>
|
|
<a name="l6"></a></span><span class=cF1>U0</span><span class=cF0> TurnNew()
|
|
<a name="l7"></a>{
|
|
<a name="l8"></a> </span><span class=cF9>I64</span><span class=cF0> i, j;
|
|
<a name="l9"></a> </span><span class=cF1>for</span><span class=cF0> (j = </span><span class=cFE>0</span><span class=cF0>; j < </span><span class=cFE>2</span><span class=cF0>; j++)
|
|
<a name="l10"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < UNITS_NUM; i++)
|
|
<a name="l11"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l12"></a> units[j][i].remaining_movement = units[j][i].movement;
|
|
<a name="l13"></a> units[j][i].fired = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l14"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l15"></a> phase = PHASE_START;
|
|
<a name="l16"></a> moving_unit = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l17"></a>
|
|
<a name="l18"></a> </span><span class=cF5>SleepUntil</span><span class=cF0>(message_off_timeout);
|
|
<a name="l19"></a> message_off_timeout = </span><span class=cFB>counts</span><span class=cF0>.jiffies + </span><span class=cF3>JIFFY_FREQ</span><span class=cF0> * </span><span class=cFE>2</span><span class=cF0> * animation_delay + </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l20"></a> </span><span class=cF5>Sound</span><span class=cF0>(</span><span class=cFE>74</span><span class=cF0>);
|
|
<a name="l21"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(message_buf, </span><span class=cF6>"Turn %d"</span><span class=cF0>, ++turn);
|
|
<a name="l22"></a> VRSetUp(</span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l23"></a> VRSetUp(</span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l24"></a> VisRecalc(VR_ALL_UNITS);
|
|
<a name="l25"></a> cur_player = (turn & </span><span class=cFE>1</span><span class=cF0>) ^ </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l26"></a> enemy_player = cur_player ^ </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l27"></a>}
|
|
<a name="l28"></a>
|
|
<a name="l29"></a></span><span class=cF1>U0</span><span class=cF0> PhaseNew()
|
|
<a name="l30"></a>{
|
|
<a name="l31"></a> cur_player ^= </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l32"></a> enemy_player = cur_player ^ </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l33"></a> </span><span class=cF1>if</span><span class=cF0> (++phase >= PHASE_END)
|
|
<a name="l34"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l35"></a> IndirectResolveAll;
|
|
<a name="l36"></a> TurnNew;
|
|
<a name="l37"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l38"></a>
|
|
<a name="l39"></a> </span><span class=cF5>SleepUntil</span><span class=cF0>(message_off_timeout);
|
|
<a name="l40"></a> message_off_timeout = </span><span class=cFB>counts</span><span class=cF0>.jiffies + </span><span class=cF3>JIFFY_FREQ</span><span class=cF0> * </span><span class=cFE>2</span><span class=cF0> * animation_delay + </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l41"></a> </span><span class=cF5>Sound</span><span class=cF0>(</span><span class=cFE>74</span><span class=cF0>);
|
|
<a name="l42"></a> </span><span class=cF1>switch</span><span class=cF0> (phase)
|
|
<a name="l43"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l44"></a> </span><span class=cF1>case</span><span class=cF0> PHASE_INDIRECT0:
|
|
<a name="l45"></a> </span><span class=cF1>case</span><span class=cF0> PHASE_INDIRECT1:
|
|
<a name="l46"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(message_buf, </span><span class=cF6>"Player %d Artillery Plot"</span><span class=cF0>, cur_player + </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l47"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l48"></a>
|
|
<a name="l49"></a> </span><span class=cF1>case</span><span class=cF0> PHASE_MOVE0:
|
|
<a name="l50"></a> </span><span class=cF1>case</span><span class=cF0> PHASE_MOVE1:
|
|
<a name="l51"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(message_buf, </span><span class=cF6>"Player %d Move"</span><span class=cF0>, cur_player + </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l52"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l53"></a>
|
|
<a name="l54"></a> </span><span class=cF1>case</span><span class=cF0> PHASE_DIRECT0:
|
|
<a name="l55"></a> </span><span class=cF1>case</span><span class=cF0> PHASE_DIRECT1:
|
|
<a name="l56"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(message_buf, </span><span class=cF6>"Player %d Fire"</span><span class=cF0>, cur_player + </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l57"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l58"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l59"></a>}
|
|
<a name="l60"></a>
|
|
<a name="l61"></a></span><span class=cF1>U0</span><span class=cF0> CharDo(</span><span class=cF1>U8</span><span class=cF0> ch)
|
|
<a name="l62"></a>{
|
|
<a name="l63"></a> </span><span class=cF9>I64</span><span class=cF0> old_inhibit, old_draw_it;
|
|
<a name="l64"></a> </span><span class=cF1>Bool</span><span class=cF0> old_cursor;
|
|
<a name="l65"></a>
|
|
<a name="l66"></a> </span><span class=cF1>switch</span><span class=cF0> (ch)
|
|
<a name="l67"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l68"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_ESC</span><span class=cF0>:
|
|
<a name="l69"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>:
|
|
<a name="l70"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'ExitGame'</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>);
|
|
<a name="l71"></a>
|
|
<a name="l72"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_SPACE</span><span class=cF0>:
|
|
<a name="l73"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'PhaseOvr'</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>);
|
|
<a name="l74"></a>
|
|
<a name="l75"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'\n'</span><span class=cF0>:
|
|
<a name="l76"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'NewGame'</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>);
|
|
<a name="l77"></a>
|
|
<a name="l78"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'1'</span><span class=cF0>:
|
|
<a name="l79"></a> ViewPlayerSet(</span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l80"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l81"></a>
|
|
<a name="l82"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'2'</span><span class=cF0>:
|
|
<a name="l83"></a> ViewPlayerSet(</span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l84"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l85"></a>
|
|
<a name="l86"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'c'</span><span class=cF0>:
|
|
<a name="l87"></a> old_draw_it = </span><span class=cF5>Fs</span><span class=cF0>->draw_it;
|
|
<a name="l88"></a> old_inhibit = </span><span class=cF5>Fs</span><span class=cF0>->win_inhibit;
|
|
<a name="l89"></a> </span><span class=cF5>Fs</span><span class=cF0>->draw_it = </span><span class=cF5>Fs</span><span class=cF0>->next_settings->draw_it;
|
|
<a name="l90"></a> </span><span class=cF5>Fs</span><span class=cF0>->win_inhibit = </span><span class=cF3>WIG_USER_TASK_DEFAULT</span><span class=cF0>;
|
|
<a name="l91"></a> old_cursor = </span><span class=cF5>DocCursor</span><span class=cF0>(</span><span class=cF3>ON</span><span class=cF0>);
|
|
<a name="l92"></a> </span><span class=cF5>DocBottom</span><span class=cF0>;
|
|
<a name="l93"></a> </span><span class=cF6>"\n$GREEN$<SHIFT-ESC>$FG$ to return to game.\n"</span><span class=cF0>;
|
|
<a name="l94"></a> </span><span class=cF5>View</span><span class=cF0>;
|
|
<a name="l95"></a> </span><span class=cF5>DocBottom</span><span class=cF0>;
|
|
<a name="l96"></a> </span><span class=cF5>DocCursor</span><span class=cF0>(old_cursor);
|
|
<a name="l97"></a> </span><span class=cF5>Fs</span><span class=cF0>->win_inhibit = old_inhibit;
|
|
<a name="l98"></a> </span><span class=cF5>Fs</span><span class=cF0>->draw_it = old_draw_it;
|
|
<a name="l99"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l100"></a>
|
|
<a name="l101"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'d'</span><span class=cF0>:
|
|
<a name="l102"></a> AnimationDelaySet;
|
|
<a name="l103"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l104"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l105"></a>}
|
|
<a name="l106"></a>
|
|
<a name="l107"></a></span><span class=cF1>U0</span><span class=cF0> UserCheck()
|
|
<a name="l108"></a>{
|
|
<a name="l109"></a> </span><span class=cF9>I64</span><span class=cF0> ch;
|
|
<a name="l110"></a>
|
|
<a name="l111"></a> </span><span class=cF1>if</span><span class=cF0> (!alive_count[</span><span class=cFE>0</span><span class=cF0>] || !alive_count[</span><span class=cFE>1</span><span class=cF0>])
|
|
<a name="l112"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'GameOver'</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>);
|
|
<a name="l113"></a> </span><span class=cF1>if</span><span class=cF0> (ch = </span><span class=cF5>CharScan</span><span class=cF0>)
|
|
<a name="l114"></a> CharDo(ch);
|
|
<a name="l115"></a>}
|
|
<a name="l116"></a>
|
|
<a name="l117"></a></span><span class=cF1>U0</span><span class=cF0> TaskEndCB()
|
|
<a name="l118"></a>{
|
|
<a name="l119"></a> </span><span class=cF5>Sound</span><span class=cF0>;
|
|
<a name="l120"></a> </span><span class=cFB>progress4</span><span class=cF0> = </span><span class=cFB>progress4_max</span><span class=cF0> = </span><span class=cFB>progress1</span><span class=cF0> = </span><span class=cFB>progress1_max</span><span class=cF0> = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l121"></a> </span><span class=cF5>Exit</span><span class=cF0>;
|
|
<a name="l122"></a>}
|
|
<a name="l123"></a>
|
|
<a name="l124"></a></span><span class=cF9>I64</span><span class=cF0> PhaseDo()
|
|
<a name="l125"></a>{
|
|
<a name="l126"></a> </span><span class=cF9>I64</span><span class=cF0> res = </span><span class=cF6>'ExitGame'</span><span class=cF0>;
|
|
<a name="l127"></a>
|
|
<a name="l128"></a> PhaseNew;
|
|
<a name="l129"></a> </span><span class=cF1>try</span><span class=cF0>
|
|
<a name="l130"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l131"></a> </span><span class=cF1>if</span><span class=cF0> (phase & ~</span><span class=cFE>1</span><span class=cF0> == PHASE_INDIRECT)
|
|
<a name="l132"></a> </span><span class=cF5>Call</span><span class=cF0>(player_indirect[cur_player]);
|
|
<a name="l133"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (phase & ~</span><span class=cFE>1</span><span class=cF0> == PHASE_MOVE)
|
|
<a name="l134"></a> </span><span class=cF5>Call</span><span class=cF0>(player_move[cur_player]);
|
|
<a name="l135"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l136"></a> </span><span class=cF5>Call</span><span class=cF0>(player_direct[cur_player]);
|
|
<a name="l137"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l138"></a> </span><span class=cF1>catch</span><span class=cF0>
|
|
<a name="l139"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l140"></a> res = </span><span class=cF5>Fs</span><span class=cF0>->except_ch;
|
|
<a name="l141"></a> </span><span class=cF5>Fs</span><span class=cF0>->catch_except = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l142"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l143"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l144"></a>}
|
|
<a name="l145"></a>
|
|
<a name="l146"></a></span><span class=cF1>U0</span><span class=cF0> ToTheFront()
|
|
<a name="l147"></a>{
|
|
<a name="l148"></a> </span><span class=cF9>I64</span><span class=cF0> res, ch;
|
|
<a name="l149"></a>
|
|
<a name="l150"></a> map_dc = </span><span class=cF5>DCNew</span><span class=cF0>(MAP_WIDTH, MAP_HEIGHT);
|
|
<a name="l151"></a>
|
|
<a name="l152"></a> </span><span class=cF5>SettingsPush</span><span class=cF0>; </span><span class=cF2>//See </span><a href="https://zeal-operating-system.github.io/ZealOS/System/TaskSettings.ZC.html#l3"><span class=cF4>SettingsPush</span></a><span class=cF0>
|
|
<a name="l153"></a> </span><span class=cF5>Cd</span><span class=cF0>(</span><span class=cF3>__DIR__</span><span class=cF0>);
|
|
<a name="l154"></a> </span><span class=cF5>Fs</span><span class=cF0>->win_inhibit |= </span><span class=cF3>WIF_SELF_MS_L</span><span class=cF0> | </span><span class=cF3>WIF_SELF_MS_R</span><span class=cF0> | </span><span class=cF3>WIG_DBL_CLICK</span><span class=cF0>;
|
|
<a name="l155"></a>
|
|
<a name="l156"></a> </span><span class=cF5>MenuPush</span><span class=cF0>( </span><span class=cF6>"File {"</span><span class=cF0>
|
|
<a name="l157"></a> </span><span class=cF6>" Abort(,CH_SHIFT_ESC);"</span><span class=cF0>
|
|
<a name="l158"></a> </span><span class=cF6>" Exit(,CH_ESC);"</span><span class=cF0>
|
|
<a name="l159"></a> </span><span class=cF6>"}"</span><span class=cF0>
|
|
<a name="l160"></a> </span><span class=cF6>"Play {"</span><span class=cF0>
|
|
<a name="l161"></a> </span><span class=cF6>" EndPhase(,CH_SPACE);"</span><span class=cF0>
|
|
<a name="l162"></a> </span><span class=cF6>" Restart(,'\n');"</span><span class=cF0>
|
|
<a name="l163"></a> </span><span class=cF6>"}"</span><span class=cF0>
|
|
<a name="l164"></a> </span><span class=cF6>"View {"</span><span class=cF0>
|
|
<a name="l165"></a> </span><span class=cF6>" Player1(,'1');"</span><span class=cF0>
|
|
<a name="l166"></a> </span><span class=cF6>" Player2(,'2');"</span><span class=cF0>
|
|
<a name="l167"></a> </span><span class=cF6>" OddsCalculations(,'c');"</span><span class=cF0>
|
|
<a name="l168"></a> </span><span class=cF6>" LOS(,0,SCF_SHIFT);"</span><span class=cF0>
|
|
<a name="l169"></a> </span><span class=cF6>"}"</span><span class=cF0>
|
|
<a name="l170"></a> </span><span class=cF6>"Settings {"</span><span class=cF0>
|
|
<a name="l171"></a> </span><span class=cF6>" AnimationDelay(,'d');"</span><span class=cF0>
|
|
<a name="l172"></a> </span><span class=cF6>"}"</span><span class=cF0>
|
|
<a name="l173"></a> );
|
|
<a name="l174"></a>
|
|
<a name="l175"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
|
|
<a name="l176"></a> </span><span class=cF5>WinBorder</span><span class=cF0>;
|
|
<a name="l177"></a> </span><span class=cF5>WinMax</span><span class=cF0>;
|
|
<a name="l178"></a> </span><span class=cF5>DocCursor</span><span class=cF0>;
|
|
<a name="l179"></a> </span><span class=cF5>DocMax</span><span class=cF0>;
|
|
<a name="l180"></a> Init;
|
|
<a name="l181"></a> PlayerPick(</span><span class=cF6>"AIs"</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l182"></a> PlayerPick(</span><span class=cF6>"AIs"</span><span class=cF0>, </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l183"></a>
|
|
<a name="l184"></a> </span><span class=cF5>PopUpOk</span><span class=cF0>( </span><span class=cF6>"$PURPLE$$TX+CX,\"ToTheFront\"$$FG$\n\n"</span><span class=cF0>
|
|
<a name="l185"></a> </span><span class=cF6>"$GREEN${Left-click and drag}$FG$ to move or fire units.\n"</span><span class=cF0>
|
|
<a name="l186"></a> </span><span class=cF6>"$GREEN$<SPACE>$FG$\tor $GREEN${Right-click}$FG$ to end phase.\n"</span><span class=cF0>
|
|
<a name="l187"></a> </span><span class=cF6>"$GREEN$<SHIFT>$FG$\tto show line-of-sight.\n"</span><span class=cF0>
|
|
<a name="l188"></a> </span><span class=cF6>"$GREEN$<ENTER>$FG$\tto start new game.\n"</span><span class=cF0>
|
|
<a name="l189"></a> </span><span class=cF6>"$GREEN$ 1$FG$\tPlayer 1 view.\n"</span><span class=cF0>
|
|
<a name="l190"></a> </span><span class=cF6>"$GREEN$ 2$FG$\tPlayer 2 view.\n"</span><span class=cF0>
|
|
<a name="l191"></a> </span><span class=cF6>"$GREEN$ c$FG$\tView odds calculations.\n"</span><span class=cF0>
|
|
<a name="l192"></a> </span><span class=cF6>"$GREEN$ d$FG$\tSet animation delay.\n\n"</span><span class=cF0>
|
|
<a name="l193"></a> </span><span class=cF6>"Squares are infantry. Cones are artillery.\n"</span><span class=cF0>
|
|
<a name="l194"></a> </span><span class=cF6>"Units move faster on enemy roads,\n"</span><span class=cF0>
|
|
<a name="l195"></a> </span><span class=cF6>"slower on friendly roads, forests, or mountains.\n"</span><span class=cF0>
|
|
<a name="l196"></a> </span><span class=cF6>"Forests and mountains hide units,\n"</span><span class=cF0>
|
|
<a name="l197"></a> </span><span class=cF6>"mountain units get high-ground bonus."</span><span class=cF0>);
|
|
<a name="l198"></a> </span><span class=cF5>PaletteSetLight</span><span class=cF0>(</span><span class=cF3>FALSE</span><span class=cF0>);
|
|
<a name="l199"></a> </span><span class=cF5>Fs</span><span class=cF0>->task_end_cb = &TaskEndCB; </span><span class=cF2>//<CTRL-ALT-x></span><span class=cF0>
|
|
<a name="l200"></a> </span><span class=cF5>Fs</span><span class=cF0>->draw_it = &</span><span class=cF5>DrawIt</span><span class=cF0>;
|
|
<a name="l201"></a> </span><span class=cF1>try</span><span class=cF0>
|
|
<a name="l202"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l203"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l204"></a> {
|
|
<a name="l205"></a> res = PhaseDo;
|
|
<a name="l206"></a> </span><span class=cF1>if</span><span class=cF0> (res == </span><span class=cF6>'GameOver'</span><span class=cF0>)
|
|
<a name="l207"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l208"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
|
|
<a name="l209"></a> {
|
|
<a name="l210"></a> message_off_timeout = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l211"></a> </span><span class=cF5>StrCopy</span><span class=cF0>(message_buf, </span><span class=cF6>"Game Over"</span><span class=cF0>);
|
|
<a name="l212"></a> </span><span class=cF5>Sound</span><span class=cF0>;
|
|
<a name="l213"></a> ch = </span><span class=cF5>CharGet</span><span class=cF0>(, </span><span class=cF3>FALSE</span><span class=cF0>);
|
|
<a name="l214"></a> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF6>'\n'</span><span class=cF0>)
|
|
<a name="l215"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l216"></a> CleanUp;
|
|
<a name="l217"></a> Init;
|
|
<a name="l218"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l219"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l220"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF3>CH_ESC</span><span class=cF0> || ch == </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>)
|
|
<a name="l221"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l222"></a> res = </span><span class=cF6>'ExitGame'</span><span class=cF0>;
|
|
<a name="l223"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l224"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l225"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF6>'1'</span><span class=cF0>)
|
|
<a name="l226"></a> ViewPlayerSet(</span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l227"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF6>'2'</span><span class=cF0>)
|
|
<a name="l228"></a> ViewPlayerSet(</span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l229"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF6>'d'</span><span class=cF0>)
|
|
<a name="l230"></a> AnimationDelaySet;
|
|
<a name="l231"></a> }
|
|
<a name="l232"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l233"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (res == </span><span class=cF6>'NewGame'</span><span class=cF0>)
|
|
<a name="l234"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l235"></a> CleanUp;
|
|
<a name="l236"></a> Init;
|
|
<a name="l237"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l238"></a> }
|
|
<a name="l239"></a> </span><span class=cF1>while</span><span class=cF0> (res != </span><span class=cF6>'ExitGame'</span><span class=cF0>);
|
|
<a name="l240"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l241"></a> </span><span class=cF1>catch</span><span class=cF0>
|
|
<a name="l242"></a> </span><span class=cF5>PutExcept</span><span class=cF0>;
|
|
<a name="l243"></a> </span><span class=cF5>ProgressBarsReset</span><span class=cF0>;
|
|
<a name="l244"></a>
|
|
<a name="l245"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
|
|
<a name="l246"></a> </span><span class=cF5>DCDel</span><span class=cF0>(map_dc);
|
|
<a name="l247"></a> CleanUp;
|
|
<a name="l248"></a> </span><span class=cF5>MenuPop</span><span class=cF0>;
|
|
<a name="l249"></a> </span><span class=cF5>Seed</span><span class=cF0>;
|
|
<a name="l250"></a>}
|
|
</span></pre></body>
|
|
</html>
|