templeos-info/public/Wb/Apps/ToTheFront/TTFDraw.HC.HTML

244 lines
22 KiB
HTML
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="generator" content="TempleOS V5.03">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="/style/templeos.css">
<script src="/script/templeos.js"></script>
<style type="text/css">
.cF0{color:#000000;background-color:#ffffff;}
.cF1{color:#0000aa;background-color:#ffffff;}
.cF2{color:#00aa00;background-color:#ffffff;}
.cF3{color:#00aaaa;background-color:#ffffff;}
.cF4{color:#aa0000;background-color:#ffffff;}
.cF5{color:#aa00aa;background-color:#ffffff;}
.cF6{color:#aa5500;background-color:#ffffff;}
.cF7{color:#aaaaaa;background-color:#ffffff;}
.cF8{color:#555555;background-color:#ffffff;}
.cF9{color:#5555ff;background-color:#ffffff;}
.cFA{color:#55ff55;background-color:#ffffff;}
.cFB{color:#55ffff;background-color:#ffffff;}
.cFC{color:#ff5555;background-color:#ffffff;}
.cFD{color:#ff55ff;background-color:#ffffff;}
.cFE{color:#ffff55;background-color:#ffffff;}
.cFF{color:#ffffff;background-color:#ffffff;}
</style>
</head>
<body>
<pre id="content">
<a name="l1"></a><span class=cFA>
<a name="l2"></a>&lt;1&gt;/* Graphics Not Rendered in HTML */</span><span class=cF0>
<a name="l3"></a>
<a name="l4"></a></span><span class=cF1>U0</span><span class=cF0> UnitDraw(</span><span class=cF9>CDC</span><span class=cF0> *dc,Unit *tmpu,</span><span class=cF9>I64</span><span class=cF0> x,</span><span class=cF9>I64</span><span class=cF0> y,</span><span class=cF1>F64</span><span class=cF0> f)
<a name="l5"></a>{
<a name="l6"></a> x+=x0; y+=y0;
<a name="l7"></a> </span><span class=cF1>if</span><span class=cF0> (tmpu-&gt;infantry)
<a name="l8"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(dc,x,y,0,tmpu-&gt;img);
<a name="l9"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l10"></a> </span><span class=cF5>Sprite3ZB</span><span class=cF0>(dc,x,y,0,tmpu-&gt;img,f);
<a name="l11"></a> </span><span class=cF1>if</span><span class=cF0> (phase&amp;~1==PHASE_INDIRECT &amp;&amp; tmpu-&gt;indirect_fire &amp;&amp;
<a name="l12"></a> !tmpu-&gt;fired &amp;&amp; tmpu-&gt;player==cur_player) </span><span class=cF7>{</span><span class=cF0>
<a name="l13"></a> dc-&gt;thick=2;
<a name="l14"></a> </span><span class=cF1>if</span><span class=cF0> (cur_player)
<a name="l15"></a> dc-&gt;color=</span><span class=cF3>PURPLE</span><span class=cF0>;
<a name="l16"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l17"></a> dc-&gt;color=</span><span class=cF3>CYAN</span><span class=cF0>;
<a name="l18"></a> </span><span class=cF5>GrCircle3</span><span class=cF0>(dc,x,y,0,20*</span><span class=cF5>Saw</span><span class=cF7>(</span><span class=cF0>4*</span><span class=cF5>tS</span><span class=cF0>,2.0</span><span class=cF7>)</span><span class=cF0>);
<a name="l19"></a> </span><span class=cF5>GrCircle3</span><span class=cF0>(dc,x,y,0,20*</span><span class=cF5>Saw</span><span class=cF7>(</span><span class=cF0>4*</span><span class=cF5>tS</span><span class=cF0>+1.0,2.0</span><span class=cF7>)</span><span class=cF0>);
<a name="l20"></a> dc-&gt;thick=1;
<a name="l21"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l22"></a>}
<a name="l23"></a>
<a name="l24"></a></span><span class=cF1>U0</span><span class=cF0> UnitsDraw(</span><span class=cF9>CDC</span><span class=cF0> *dc)
<a name="l25"></a>{
<a name="l26"></a> </span><span class=cF9>I64</span><span class=cF0> i,j;
<a name="l27"></a> </span><span class=cF1>F64</span><span class=cF0> x,y;
<a name="l28"></a> Unit *tmpu;
<a name="l29"></a> </span><span class=cF1>for</span><span class=cF0> (j=0;j&lt;2;j++) </span><span class=cF7>{</span><span class=cF0>
<a name="l30"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;UNITS_NUM;i++) {
<a name="l31"></a> tmpu=&amp;units[j][i];
<a name="l32"></a> </span><span class=cF1>if</span><span class=cF0> (tmpu==target_unit) </span><span class=cF7>{</span><span class=cF0>
<a name="l33"></a> </span><span class=cF1>if</span><span class=cF0> (target_hit)
<a name="l34"></a> dc-&gt;color=</span><span class=cF3>RED</span><span class=cF0>;
<a name="l35"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l36"></a> dc-&gt;color=</span><span class=cF3>GREEN</span><span class=cF0>;
<a name="l37"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l38"></a> </span><span class=cF1>if</span><span class=cF0> (j)
<a name="l39"></a> dc-&gt;color=</span><span class=cF3>LTPURPLE</span><span class=cF0>;
<a name="l40"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l41"></a> dc-&gt;color=</span><span class=cF3>LTCYAN</span><span class=cF0>;
<a name="l42"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l43"></a> </span><span class=cF1>if</span><span class=cF0> (tmpu-&gt;life&gt;0 &amp;&amp; </span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;tmpu-&gt;vis[view_player],0</span><span class=cF7>)</span><span class=cF0> &amp;&amp;
<a name="l44"></a> tmpu!=moving_unit) </span><span class=cF7>{</span><span class=cF0>
<a name="l45"></a> RowCol2XY(&amp;x,&amp;y,tmpu-&gt;row,tmpu-&gt;col);
<a name="l46"></a> </span><span class=cF1>if</span><span class=cF0> (phase&amp;~1==PHASE_MOVE &amp;&amp; tmpu-&gt;remaining_movement ||
<a name="l47"></a> </span><span class=cF7>(</span><span class=cF0>phase&amp;~1==PHASE_INDIRECT&amp;&amp; tmpu-&gt;indirect_fire||
<a name="l48"></a> phase&amp;~1==PHASE_DIRECT&amp;&amp;!tmpu-&gt;indirect_fire</span><span class=cF7>)</span><span class=cF0> &amp;&amp; !tmpu-&gt;fired ||
<a name="l49"></a> </span><span class=cF5>Blink</span><span class=cF7>(</span><span class=cF0>5</span><span class=cF7>)</span><span class=cF0>)
<a name="l50"></a> UnitDraw(dc,tmpu,x,y,tmpu-&gt;facing*60.0*</span><span class=cF3>pi</span><span class=cF0>/180.0);
<a name="l51"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l52"></a> }
<a name="l53"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l54"></a>}
<a name="l55"></a>
<a name="l56"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DrawIt</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task,</span><span class=cF9>CDC</span><span class=cF0> *dc)
<a name="l57"></a>{
<a name="l58"></a> </span><span class=cF1>F64</span><span class=cF0> x,y;
<a name="l59"></a> </span><span class=cF9>I64</span><span class=cF0> i,j,r,c;
<a name="l60"></a> </span><span class=cF1>U8</span><span class=cF0> buf[</span><span class=cF3>STR_LEN</span><span class=cF0>];
<a name="l61"></a> IndirectOrders *tmpi;
<a name="l62"></a>
<a name="l63"></a> </span><span class=cF2>//Erase text beneath.</span><span class=cF0>
<a name="l64"></a> dc-&gt;color=</span><span class=cF3>WHITE</span><span class=cF0>;
<a name="l65"></a> </span><span class=cF5>GrRect</span><span class=cF0>(dc,-task-&gt;scroll_x,-task-&gt;scroll_y,dc-&gt;width,dc-&gt;height);
<a name="l66"></a>
<a name="l67"></a> map_dc-&gt;flags|=</span><span class=cF3>DCF_NO_TRANSPARENTS</span><span class=cF0>;
<a name="l68"></a> </span><span class=cF5>GrBlot</span><span class=cF0>(dc,x0,y0,map_dc);
<a name="l69"></a>
<a name="l70"></a> i=</span><span class=cFB>ms</span><span class=cF0>.pos.x-task-&gt;pix_left-task-&gt;scroll_x;
<a name="l71"></a> j=</span><span class=cFB>ms</span><span class=cF0>.pos.y-task-&gt;pix_top -task-&gt;scroll_y;
<a name="l72"></a> </span><span class=cF1>if</span><span class=cF0> (CursorInWin</span><span class=cF7>(</span><span class=cF0>task,i,j</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l73"></a> i-=x0; j-=y0;
<a name="l74"></a> CursorUpdate(task,i,j);
<a name="l75"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l76"></a> RowCol2XY(&amp;x,&amp;y,cursor_row,cursor_col);
<a name="l77"></a>
<a name="l78"></a> </span><span class=cF2>//Roads require multiple cursor fills</span><span class=cF0>
<a name="l79"></a> dc-&gt;color=</span><span class=cF3>YELLOW</span><span class=cF0>;
<a name="l80"></a> c=terrain[cursor_row][cursor_col];
<a name="l81"></a> </span><span class=cF1>for</span><span class=cF0> (i=-</span><span class=cF7>(</span><span class=cF0>HEX_SIDE+DCOS</span><span class=cF7>)</span><span class=cF0>/2;i&lt;=</span><span class=cF7>(</span><span class=cF0>HEX_SIDE+DCOS</span><span class=cF7>)</span><span class=cF0>/2;i++) </span><span class=cF7>{</span><span class=cF0>
<a name="l82"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>GrPeek</span><span class=cF7>(</span><span class=cF0>dc,x+i+x0,y+y0</span><span class=cF7>)</span><span class=cF0>==c)
<a name="l83"></a> </span><span class=cF5>GrFloodFill</span><span class=cF0>(dc,x+i+x0,y+y0);
<a name="l84"></a> </span><span class=cF1>for</span><span class=cF0> (j=-HEX_SIDE/2;j&lt;=HEX_SIDE/2;j++)
<a name="l85"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>GrPeek</span><span class=cF7>(</span><span class=cF0>dc,x+j+x0,y+i+y0</span><span class=cF7>)</span><span class=cF0>==c)
<a name="l86"></a> </span><span class=cF5>GrFloodFill</span><span class=cF0>(dc,x+j+x0,y+i+y0);
<a name="l87"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l88"></a>
<a name="l89"></a> UnitsDraw(dc);
<a name="l90"></a> </span><span class=cF1>if</span><span class=cF0> (firing) </span><span class=cF7>{</span><span class=cF0>
<a name="l91"></a> dc-&gt;color=</span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l92"></a> </span><span class=cF5>GrCircle</span><span class=cF0>(dc,fire_x+x0,fire_y+y0,2);
<a name="l93"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l94"></a> </span><span class=cF1>if</span><span class=cF0> (indirect_explosion) </span><span class=cF7>{</span><span class=cF0>
<a name="l95"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;7;i++) {
<a name="l96"></a> </span><span class=cF1>if</span><span class=cF0> (indirect_row&amp;1)
<a name="l97"></a> c=indirect_col+col_offsets_odd[i];
<a name="l98"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l99"></a> c=indirect_col+col_offsets_even[i];
<a name="l100"></a> r=indirect_row+row_offsets[i];
<a name="l101"></a> </span><span class=cF1>if</span><span class=cF0> (0&lt;=r&lt;map_rows &amp;&amp; 0&lt;=c&lt;map_cols) </span><span class=cF7>{</span><span class=cF0>
<a name="l102"></a> RowCol2XY(&amp;x,&amp;y,r,c);
<a name="l103"></a> </span><span class=cF1>for</span><span class=cF0> (j=0;j&lt;10;j++) {
<a name="l104"></a> </span><span class=cF1>if</span><span class=cF0> (j&amp;1)
<a name="l105"></a> dc-&gt;color=</span><span class=cF3>LTRED</span><span class=cF0>;
<a name="l106"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l107"></a> dc-&gt;color=</span><span class=cF3>YELLOW</span><span class=cF0>;
<a name="l108"></a> </span><span class=cF5>GrCircle</span><span class=cF0>(dc,x+</span><span class=cF5>RandU16</span><span class=cF0>%HEX_SIDE-HEX_SIDE/2+x0,
<a name="l109"></a> y+</span><span class=cF5>RandU16</span><span class=cF0>%HEX_SIDE-HEX_SIDE/2+y0,2);
<a name="l110"></a> }
<a name="l111"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l112"></a> }
<a name="l113"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l114"></a> </span><span class=cF1>if</span><span class=cF0> (moving_unit &amp;&amp; moving_unit-&gt;vis[view_player]) </span><span class=cF7>{</span><span class=cF0>
<a name="l115"></a> dc-&gt;color=</span><span class=cF3>YELLOW</span><span class=cF0>;
<a name="l116"></a> UnitDraw(dc,moving_unit,move_x,move_y,move_facing);
<a name="l117"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l118"></a> </span><span class=cF5>ProgressBarsRst</span><span class=cF0>;
<a name="l119"></a> </span><span class=cF1>if</span><span class=cF0> (moving_unit) </span><span class=cF7>{</span><span class=cF0>
<a name="l120"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>ms</span><span class=cF0>.pos.y&lt;</span><span class=cF3>GR_HEIGHT</span><span class=cF0>/2) {
<a name="l121"></a> </span><span class=cFB>progress4_max</span><span class=cF0>=moving_unit-&gt;movement;
<a name="l122"></a> </span><span class=cFB>progress4</span><span class=cF0>=moving_unit-&gt;remaining_movement;
<a name="l123"></a> } </span><span class=cF1>else</span><span class=cF0> {
<a name="l124"></a> </span><span class=cFB>progress1_max</span><span class=cF0>=moving_unit-&gt;movement;
<a name="l125"></a> </span><span class=cFB>progress1</span><span class=cF0>=moving_unit-&gt;remaining_movement;
<a name="l126"></a> }
<a name="l127"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l128"></a> </span><span class=cF1>if</span><span class=cF0> (fire_radius) </span><span class=cF7>{</span><span class=cF0>
<a name="l129"></a> dc-&gt;color=</span><span class=cF3>YELLOW</span><span class=cF0>;
<a name="l130"></a> </span><span class=cF5>GrCircle</span><span class=cF0>(dc,fire_radius_x+x0,fire_radius_y+y0,fire_radius-1);
<a name="l131"></a> </span><span class=cF5>GrCircle</span><span class=cF0>(dc,fire_radius_x+x0,fire_radius_y+y0,fire_radius+1);
<a name="l132"></a> dc-&gt;color=</span><span class=cF3>RED</span><span class=cF0>;
<a name="l133"></a> </span><span class=cF5>GrCircle</span><span class=cF0>(dc,fire_radius_x+x0,fire_radius_y+y0,fire_radius);
<a name="l134"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l135"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Blink</span><span class=cF7>(</span><span class=cF0>10</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l136"></a> tmpi=indirect_head.next;
<a name="l137"></a> </span><span class=cF1>while</span><span class=cF0> (tmpi!=&amp;indirect_head) {
<a name="l138"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi-&gt;attacker-&gt;player==view_player) </span><span class=cF7>{</span><span class=cF0>
<a name="l139"></a> RowCol2XY(&amp;x,&amp;y,tmpi-&gt;row,tmpi-&gt;col);
<a name="l140"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(dc,x+x0,y+y0,0,</span><span class=cFA>&lt;1&gt;</span><span class=cF0>);
<a name="l141"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l142"></a> tmpi=tmpi-&gt;next;
<a name="l143"></a> }
<a name="l144"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l145"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>kbd</span><span class=cF0>.down_bitmap,</span><span class=cF3>SC_SHIFT</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l146"></a> </span><span class=cF1>if</span><span class=cF0> (show_vis_row!=cursor_row || show_vis_col!=cursor_col) {
<a name="l147"></a> show_vis_row=cursor_row;
<a name="l148"></a> show_vis_col=cursor_col;
<a name="l149"></a> VisRecalcMap(show_vis_row,show_vis_col);
<a name="l150"></a> }
<a name="l151"></a>
<a name="l152"></a> dc-&gt;color=</span><span class=cF3>LTGRAY</span><span class=cF0>;
<a name="l153"></a> </span><span class=cF1>for</span><span class=cF0> (j=0;j&lt;map_rows;j++)
<a name="l154"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;map_cols;i++)
<a name="l155"></a> </span><span class=cF1>if</span><span class=cF0> (!vis_map[j][i]) {
<a name="l156"></a> RowCol2XY(&amp;x,&amp;y,j,i);
<a name="l157"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc,x-6+x0,y-6+y0,x+6+x0,y+6+y0);
<a name="l158"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc,x+6+x0,y-6+y0,x-6+x0,y+6+y0);
<a name="l159"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc,x+x0,y-6+y0,x+x0,y+6+y0);
<a name="l160"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc,x+6+x0,y+y0,x-6+x0,y+y0);
<a name="l161"></a> }
<a name="l162"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l163"></a> </span><span class=cF1>if</span><span class=cF0> (i=</span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>msg_buf</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF3>FONT_WIDTH</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l164"></a> dc-&gt;color=</span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l165"></a> </span><span class=cF5>GrRect</span><span class=cF0>(dc,</span><span class=cF7>(</span><span class=cF0>task-&gt;pix_width-i</span><span class=cF7>)</span><span class=cF0>&gt;&gt;1-10-task-&gt;scroll_x,
<a name="l166"></a> </span><span class=cF7>(</span><span class=cF0>task-&gt;pix_height-</span><span class=cF3>FONT_HEIGHT</span><span class=cF7>)</span><span class=cF0>&gt;&gt;1-10-task-&gt;scroll_y,
<a name="l167"></a> i+20,</span><span class=cF3>FONT_HEIGHT</span><span class=cF0>+20);
<a name="l168"></a>
<a name="l169"></a> dc-&gt;color=</span><span class=cF3>YELLOW</span><span class=cF0>;
<a name="l170"></a> </span><span class=cF5>GrRect</span><span class=cF0>(dc,</span><span class=cF7>(</span><span class=cF0>task-&gt;pix_width-i</span><span class=cF7>)</span><span class=cF0>&gt;&gt;1-7-task-&gt;scroll_x,
<a name="l171"></a> </span><span class=cF7>(</span><span class=cF0>task-&gt;pix_height-</span><span class=cF3>FONT_HEIGHT</span><span class=cF7>)</span><span class=cF0>&gt;&gt;1-7-task-&gt;scroll_y,
<a name="l172"></a> i+14,</span><span class=cF3>FONT_HEIGHT</span><span class=cF0>+14);
<a name="l173"></a>
<a name="l174"></a> dc-&gt;color=</span><span class=cF3>RED</span><span class=cF0>;
<a name="l175"></a> </span><span class=cF5>GrPrint</span><span class=cF0>(dc,</span><span class=cF7>(</span><span class=cF0>task-&gt;pix_width-i</span><span class=cF7>)</span><span class=cF0>&gt;&gt;1-task-&gt;scroll_x,
<a name="l176"></a> </span><span class=cF7>(</span><span class=cF0>task-&gt;pix_height-</span><span class=cF3>FONT_HEIGHT</span><span class=cF7>)</span><span class=cF0>&gt;&gt;1-task-&gt;scroll_y,
<a name="l177"></a> msg_buf);
<a name="l178"></a> </span><span class=cF1>if</span><span class=cF0> (msg_off_timeout) {
<a name="l179"></a> </span><span class=cF1>if</span><span class=cF0> (msg_off_timeout-</span><span class=cFB>cnts</span><span class=cF0>.jiffies&lt;3*</span><span class=cF3>JIFFY_FREQ</span><span class=cF0>/2*animation_delay)
<a name="l180"></a> </span><span class=cF5>Snd</span><span class=cF0>;
<a name="l181"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>cnts</span><span class=cF0>.jiffies&gt;msg_off_timeout)
<a name="l182"></a> *msg_buf=0;
<a name="l183"></a> }
<a name="l184"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l185"></a>
<a name="l186"></a> dc-&gt;color=</span><span class=cF3>WHITE</span><span class=cF0>;
<a name="l187"></a> </span><span class=cF5>GrRect</span><span class=cF0>(dc,-task-&gt;scroll_x,-task-&gt;scroll_y,
<a name="l188"></a> </span><span class=cF7>(</span><span class=cF0>13+7+10+10</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF3>FONT_WIDTH</span><span class=cF0>,</span><span class=cF3>FONT_HEIGHT</span><span class=cF0>);
<a name="l189"></a>
<a name="l190"></a> </span><span class=cF1>if</span><span class=cF0> (phase&amp;~1==PHASE_INDIRECT)
<a name="l191"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(buf,</span><span class=cF6>&quot;Turn:%2d Artillery&quot;</span><span class=cF0>,turn);
<a name="l192"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (phase&amp;~1==PHASE_MOVE)
<a name="l193"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(buf,</span><span class=cF6>&quot;Turn:%2d Move&quot;</span><span class=cF0>,turn);
<a name="l194"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l195"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(buf,</span><span class=cF6>&quot;Turn:%2d Fire&quot;</span><span class=cF0>,turn);
<a name="l196"></a> dc-&gt;color=</span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l197"></a> </span><span class=cF5>GrPrint</span><span class=cF0>(dc,-task-&gt;scroll_x,-task-&gt;scroll_y,buf);
<a name="l198"></a>
<a name="l199"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(buf,</span><span class=cF6>&quot;%3d Units&quot;</span><span class=cF0>,alive_cnt[0]);
<a name="l200"></a> </span><span class=cF1>if</span><span class=cF0> (cur_player || </span><span class=cF5>Blink</span><span class=cF0>)
<a name="l201"></a> dc-&gt;color=</span><span class=cF3>CYAN</span><span class=cF0>;
<a name="l202"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l203"></a> dc-&gt;color=</span><span class=cF3>LTCYAN</span><span class=cF0>;
<a name="l204"></a> </span><span class=cF5>GrPrint</span><span class=cF0>(dc,-task-&gt;scroll_x+</span><span class=cF7>(</span><span class=cF0>13+7</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF3>FONT_WIDTH</span><span class=cF0>,-task-&gt;scroll_y,buf);
<a name="l205"></a>
<a name="l206"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(buf,</span><span class=cF6>&quot;%3d Units&quot;</span><span class=cF0>,alive_cnt[1]);
<a name="l207"></a> </span><span class=cF1>if</span><span class=cF0> (!cur_player || </span><span class=cF5>Blink</span><span class=cF0>)
<a name="l208"></a> dc-&gt;color=</span><span class=cF3>PURPLE</span><span class=cF0>;
<a name="l209"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l210"></a> dc-&gt;color=</span><span class=cF3>LTPURPLE</span><span class=cF0>;
<a name="l211"></a> </span><span class=cF5>GrPrint</span><span class=cF0>(dc,-task-&gt;scroll_x+</span><span class=cF7>(</span><span class=cF0>13+7+10</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF3>FONT_WIDTH</span><span class=cF0>,-task-&gt;scroll_y,buf);
<a name="l212"></a>}
</span></pre></body>
</html>