diff options
Diffstat (limited to 'html')
-rw-r--r-- | html/080display.cc.html | 213 |
1 files changed, 108 insertions, 105 deletions
diff --git a/html/080display.cc.html b/html/080display.cc.html index 0b7b9bad..556b88dd 100644 --- a/html/080display.cc.html +++ b/html/080display.cc.html @@ -421,112 +421,115 @@ if ('onhashchange' in window) { <span id="L359" class="LineNr">359 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>event_type == TB_EVENT_KEY && event<span class="Delimiter">.</span>key < <span class="Constant">0xff</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L360" class="LineNr">360 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">text event</span><span class="Comment">*/</span><span class="Constant">0</span><span class="Delimiter">);</span> <span id="L361" class="LineNr">361 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>event<span class="Delimiter">.</span>key == TB_KEY_CTRL_C<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L362" class="LineNr">362 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> tb_shutdown<span class="Delimiter">();</span> -<span id="L363" class="LineNr">363 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> exit<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> -<span id="L364" class="LineNr">364 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L365" class="LineNr">365 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>event<span class="Delimiter">.</span>key == TB_KEY_BACKSPACE2<span class="Delimiter">)</span> event<span class="Delimiter">.</span>key = TB_KEY_BACKSPACE<span class="Delimiter">;</span> -<span id="L366" class="LineNr">366 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>event<span class="Delimiter">.</span>key == TB_KEY_CARRIAGE_RETURN<span class="Delimiter">)</span> event<span class="Delimiter">.</span>key = TB_KEY_NEWLINE<span class="Delimiter">;</span> -<span id="L367" class="LineNr">367 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>event<span class="Delimiter">.</span>key<span class="Delimiter">);</span> -<span id="L368" class="LineNr">368 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L369" class="LineNr">369 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L370" class="LineNr">370 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">found</span><span class="Comment">*/</span><span class="Constant">true</span><span class="Delimiter">);</span> -<span id="L371" class="LineNr">371 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L372" class="LineNr">372 </span> <span class="Delimiter">}</span> -<span id="L373" class="LineNr">373 </span> <span class="Comment">// keys outside ascii aren't unicode characters but arbitrary termbox inventions</span> -<span id="L374" class="LineNr">374 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>event_type == TB_EVENT_KEY<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L375" class="LineNr">375 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">keycode event</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">);</span> -<span id="L376" class="LineNr">376 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>event<span class="Delimiter">.</span>key<span class="Delimiter">);</span> -<span id="L377" class="LineNr">377 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L378" class="LineNr">378 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L379" class="LineNr">379 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">found</span><span class="Comment">*/</span><span class="Constant">true</span><span class="Delimiter">);</span> -<span id="L380" class="LineNr">380 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L381" class="LineNr">381 </span> <span class="Delimiter">}</span> -<span id="L382" class="LineNr">382 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>event_type == TB_EVENT_MOUSE<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L383" class="LineNr">383 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">touch event</span><span class="Comment">*/</span><span class="Constant">2</span><span class="Delimiter">);</span> -<span id="L384" class="LineNr">384 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>event<span class="Delimiter">.</span>key<span class="Delimiter">);</span> <span class="Comment">// which button, etc.</span> -<span id="L385" class="LineNr">385 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>event<span class="Delimiter">.</span>y<span class="Delimiter">);</span> <span class="Comment">// row</span> -<span id="L386" class="LineNr">386 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>event<span class="Delimiter">.</span>x<span class="Delimiter">);</span> <span class="Comment">// column</span> -<span id="L387" class="LineNr">387 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">found</span><span class="Comment">*/</span><span class="Constant">true</span><span class="Delimiter">);</span> -<span id="L388" class="LineNr">388 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L389" class="LineNr">389 </span> <span class="Delimiter">}</span> -<span id="L390" class="LineNr">390 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>event_type == TB_EVENT_RESIZE<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L391" class="LineNr">391 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">resize event</span><span class="Comment">*/</span><span class="Constant">3</span><span class="Delimiter">);</span> -<span id="L392" class="LineNr">392 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>event<span class="Delimiter">.</span>w<span class="Delimiter">);</span> <span class="Comment">// width</span> -<span id="L393" class="LineNr">393 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>event<span class="Delimiter">.</span>h<span class="Delimiter">);</span> <span class="Comment">// height</span> -<span id="L394" class="LineNr">394 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L395" class="LineNr">395 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">found</span><span class="Comment">*/</span><span class="Constant">true</span><span class="Delimiter">);</span> -<span id="L396" class="LineNr">396 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L397" class="LineNr">397 </span> <span class="Delimiter">}</span> -<span id="L398" class="LineNr">398 </span> assert<span class="Delimiter">(</span>event_type == <span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L399" class="LineNr">399 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L400" class="LineNr">400 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L401" class="LineNr">401 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L362" class="LineNr">362 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment">// leave the screen in a relatively clean state</span> +<span id="L363" class="LineNr">363 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> tb_set_cursor<span class="Delimiter">(</span>tb_width<span class="Delimiter">()</span>-<span class="Constant">1</span><span class="Delimiter">,</span> tb_height<span class="Delimiter">()</span>-<span class="Constant">1</span><span class="Delimiter">);</span> +<span id="L364" class="LineNr">364 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> cout << <span class="Constant">"</span><span class="cSpecial">\r\n</span><span class="Constant">"</span><span class="Delimiter">;</span> +<span id="L365" class="LineNr">365 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> tb_shutdown<span class="Delimiter">();</span> +<span id="L366" class="LineNr">366 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> exit<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> +<span id="L367" class="LineNr">367 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> +<span id="L368" class="LineNr">368 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>event<span class="Delimiter">.</span>key == TB_KEY_BACKSPACE2<span class="Delimiter">)</span> event<span class="Delimiter">.</span>key = TB_KEY_BACKSPACE<span class="Delimiter">;</span> +<span id="L369" class="LineNr">369 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>event<span class="Delimiter">.</span>key == TB_KEY_CARRIAGE_RETURN<span class="Delimiter">)</span> event<span class="Delimiter">.</span>key = TB_KEY_NEWLINE<span class="Delimiter">;</span> +<span id="L370" class="LineNr">370 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>event<span class="Delimiter">.</span>key<span class="Delimiter">);</span> +<span id="L371" class="LineNr">371 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L372" class="LineNr">372 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L373" class="LineNr">373 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">found</span><span class="Comment">*/</span><span class="Constant">true</span><span class="Delimiter">);</span> +<span id="L374" class="LineNr">374 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L375" class="LineNr">375 </span> <span class="Delimiter">}</span> +<span id="L376" class="LineNr">376 </span> <span class="Comment">// keys outside ascii aren't unicode characters but arbitrary termbox inventions</span> +<span id="L377" class="LineNr">377 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>event_type == TB_EVENT_KEY<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L378" class="LineNr">378 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">keycode event</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">);</span> +<span id="L379" class="LineNr">379 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>event<span class="Delimiter">.</span>key<span class="Delimiter">);</span> +<span id="L380" class="LineNr">380 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L381" class="LineNr">381 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L382" class="LineNr">382 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">found</span><span class="Comment">*/</span><span class="Constant">true</span><span class="Delimiter">);</span> +<span id="L383" class="LineNr">383 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L384" class="LineNr">384 </span> <span class="Delimiter">}</span> +<span id="L385" class="LineNr">385 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>event_type == TB_EVENT_MOUSE<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L386" class="LineNr">386 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">touch event</span><span class="Comment">*/</span><span class="Constant">2</span><span class="Delimiter">);</span> +<span id="L387" class="LineNr">387 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>event<span class="Delimiter">.</span>key<span class="Delimiter">);</span> <span class="Comment">// which button, etc.</span> +<span id="L388" class="LineNr">388 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>event<span class="Delimiter">.</span>y<span class="Delimiter">);</span> <span class="Comment">// row</span> +<span id="L389" class="LineNr">389 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>event<span class="Delimiter">.</span>x<span class="Delimiter">);</span> <span class="Comment">// column</span> +<span id="L390" class="LineNr">390 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">found</span><span class="Comment">*/</span><span class="Constant">true</span><span class="Delimiter">);</span> +<span id="L391" class="LineNr">391 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L392" class="LineNr">392 </span> <span class="Delimiter">}</span> +<span id="L393" class="LineNr">393 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>event_type == TB_EVENT_RESIZE<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L394" class="LineNr">394 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">resize event</span><span class="Comment">*/</span><span class="Constant">3</span><span class="Delimiter">);</span> +<span id="L395" class="LineNr">395 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>event<span class="Delimiter">.</span>w<span class="Delimiter">);</span> <span class="Comment">// width</span> +<span id="L396" class="LineNr">396 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>event<span class="Delimiter">.</span>h<span class="Delimiter">);</span> <span class="Comment">// height</span> +<span id="L397" class="LineNr">397 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L398" class="LineNr">398 </span> <span class="Conceal">¦</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">found</span><span class="Comment">*/</span><span class="Constant">true</span><span class="Delimiter">);</span> +<span id="L399" class="LineNr">399 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L400" class="LineNr">400 </span> <span class="Delimiter">}</span> +<span id="L401" class="LineNr">401 </span> assert<span class="Delimiter">(</span>event_type == <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L402" class="LineNr">402 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L403" class="LineNr">403 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">found</span><span class="Comment">*/</span><span class="Constant">false</span><span class="Delimiter">);</span> -<span id="L404" class="LineNr">404 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L405" class="LineNr">405 </span><span class="Delimiter">}</span> -<span id="L406" class="LineNr">406 </span> -<span id="L407" class="LineNr">407 </span><span class="Delimiter">:(before "End Primitive Recipe Declarations")</span> -<span id="L408" class="LineNr">408 </span>INTERACTIONS_LEFT<span class="Delimiter">,</span> -<span id="L409" class="LineNr">409 </span><span class="Delimiter">:(before "End Primitive Recipe Numbers")</span> -<span id="L410" class="LineNr">410 </span><a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"interactions-left?"</span><span class="Delimiter">,</span> INTERACTIONS_LEFT<span class="Delimiter">);</span> -<span id="L411" class="LineNr">411 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> -<span id="L412" class="LineNr">412 </span><span class="Normal">case</span> INTERACTIONS_LEFT: <span class="Delimiter">{</span> -<span id="L413" class="LineNr">413 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L414" class="LineNr">414 </span><span class="Delimiter">}</span> -<span id="L415" class="LineNr">415 </span><span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> -<span id="L416" class="LineNr">416 </span><span class="Normal">case</span> INTERACTIONS_LEFT: <span class="Delimiter">{</span> -<span id="L417" class="LineNr">417 </span> <a href='080display.cc.html#L20'>CHECK_CONSOLE</a><span class="Delimiter">;</span> -<span id="L418" class="LineNr">418 </span> products<span class="Delimiter">.</span>resize<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> -<span id="L419" class="LineNr">419 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>tb_event_ready<span class="Delimiter">());</span> -<span id="L420" class="LineNr">420 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L421" class="LineNr">421 </span><span class="Delimiter">}</span> -<span id="L422" class="LineNr">422 </span> -<span id="L423" class="LineNr">423 </span><span class="Comment">//: hacks to make text-mode apps more responsive under Unix</span> -<span id="L424" class="LineNr">424 </span> -<span id="L425" class="LineNr">425 </span><span class="Delimiter">:(before "End Primitive Recipe Declarations")</span> -<span id="L426" class="LineNr">426 </span>CLEAR_LINE_ON_DISPLAY<span class="Delimiter">,</span> -<span id="L427" class="LineNr">427 </span><span class="Delimiter">:(before "End Primitive Recipe Numbers")</span> -<span id="L428" class="LineNr">428 </span><a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"clear-line-on-display"</span><span class="Delimiter">,</span> CLEAR_LINE_ON_DISPLAY<span class="Delimiter">);</span> -<span id="L429" class="LineNr">429 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> -<span id="L430" class="LineNr">430 </span><span class="Normal">case</span> CLEAR_LINE_ON_DISPLAY: <span class="Delimiter">{</span> -<span id="L431" class="LineNr">431 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L432" class="LineNr">432 </span><span class="Delimiter">}</span> -<span id="L433" class="LineNr">433 </span><span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> -<span id="L434" class="LineNr">434 </span><span class="Normal">case</span> CLEAR_LINE_ON_DISPLAY: <span class="Delimiter">{</span> -<span id="L435" class="LineNr">435 </span> <a href='080display.cc.html#L12'>CHECK_SCREEN</a><span class="Delimiter">;</span> -<span id="L436" class="LineNr">436 </span> <span class="Normal">int</span> width = tb_width<span class="Delimiter">();</span> -<span id="L437" class="LineNr">437 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> x = Display_column<span class="Delimiter">;</span> x < width<span class="Delimiter">;</span> ++x<span class="Delimiter">)</span> -<span id="L438" class="LineNr">438 </span> <span class="Conceal">¦</span> tb_print<span class="Delimiter">(</span><span class="Constant">' '</span><span class="Delimiter">,</span> TB_WHITE<span class="Delimiter">,</span> TB_BLACK<span class="Delimiter">);</span> -<span id="L439" class="LineNr">439 </span> tb_set_cursor<span class="Delimiter">(</span>Display_column<span class="Delimiter">,</span> Display_row<span class="Delimiter">);</span> -<span id="L440" class="LineNr">440 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L441" class="LineNr">441 </span><span class="Delimiter">}</span> -<span id="L442" class="LineNr">442 </span> -<span id="L443" class="LineNr">443 </span><span class="Delimiter">:(before "End Primitive Recipe Declarations")</span> -<span id="L444" class="LineNr">444 </span>CLEAR_DISPLAY_FROM<span class="Delimiter">,</span> -<span id="L445" class="LineNr">445 </span><span class="Delimiter">:(before "End Primitive Recipe Numbers")</span> -<span id="L446" class="LineNr">446 </span><a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"clear-display-from"</span><span class="Delimiter">,</span> CLEAR_DISPLAY_FROM<span class="Delimiter">);</span> -<span id="L447" class="LineNr">447 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> -<span id="L448" class="LineNr">448 </span><span class="Normal">case</span> CLEAR_DISPLAY_FROM: <span class="Delimiter">{</span> -<span id="L449" class="LineNr">449 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L450" class="LineNr">450 </span><span class="Delimiter">}</span> -<span id="L451" class="LineNr">451 </span><span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> -<span id="L452" class="LineNr">452 </span><span class="Normal">case</span> CLEAR_DISPLAY_FROM: <span class="Delimiter">{</span> -<span id="L453" class="LineNr">453 </span> <a href='080display.cc.html#L12'>CHECK_SCREEN</a><span class="Delimiter">;</span> -<span id="L454" class="LineNr">454 </span> <span class="Comment">// todo: error checking</span> -<span id="L455" class="LineNr">455 </span> <span class="Normal">int</span> row = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L456" class="LineNr">456 </span> <span class="Normal">int</span> column = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L457" class="LineNr">457 </span> <span class="Normal">int</span> left = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L458" class="LineNr">458 </span> <span class="Normal">int</span> right = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">3</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L459" class="LineNr">459 </span> <span class="Normal">int</span> height=tb_height<span class="Delimiter">();</span> -<span id="L460" class="LineNr">460 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">nada</span><span class="Comment">*/</span><span class="Delimiter">;</span> row < height<span class="Delimiter">;</span> ++row<span class="Delimiter">,</span> column=left<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Comment">// start column from left in every inner loop except first</span> -<span id="L461" class="LineNr">461 </span> <span class="Conceal">¦</span> tb_set_cursor<span class="Delimiter">(</span>column<span class="Delimiter">,</span> row<span class="Delimiter">);</span> -<span id="L462" class="LineNr">462 </span> <span class="Conceal">¦</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">nada</span><span class="Comment">*/</span><span class="Delimiter">;</span> column <= right<span class="Delimiter">;</span> ++column<span class="Delimiter">)</span> -<span id="L463" class="LineNr">463 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> tb_print<span class="Delimiter">(</span><span class="Constant">' '</span><span class="Delimiter">,</span> TB_WHITE<span class="Delimiter">,</span> TB_BLACK<span class="Delimiter">);</span> -<span id="L464" class="LineNr">464 </span> <span class="Delimiter">}</span> -<span id="L465" class="LineNr">465 </span> tb_set_cursor<span class="Delimiter">(</span>Display_column<span class="Delimiter">,</span> Display_row<span class="Delimiter">);</span> -<span id="L466" class="LineNr">466 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L467" class="LineNr">467 </span><span class="Delimiter">}</span> +<span id="L403" class="LineNr">403 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L404" class="LineNr">404 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L405" class="LineNr">405 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L406" class="LineNr">406 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">found</span><span class="Comment">*/</span><span class="Constant">false</span><span class="Delimiter">);</span> +<span id="L407" class="LineNr">407 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L408" class="LineNr">408 </span><span class="Delimiter">}</span> +<span id="L409" class="LineNr">409 </span> +<span id="L410" class="LineNr">410 </span><span class="Delimiter">:(before "End Primitive Recipe Declarations")</span> +<span id="L411" class="LineNr">411 </span>INTERACTIONS_LEFT<span class="Delimiter">,</span> +<span id="L412" class="LineNr">412 </span><span class="Delimiter">:(before "End Primitive Recipe Numbers")</span> +<span id="L413" class="LineNr">413 </span><a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"interactions-left?"</span><span class="Delimiter">,</span> INTERACTIONS_LEFT<span class="Delimiter">);</span> +<span id="L414" class="LineNr">414 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> +<span id="L415" class="LineNr">415 </span><span class="Normal">case</span> INTERACTIONS_LEFT: <span class="Delimiter">{</span> +<span id="L416" class="LineNr">416 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L417" class="LineNr">417 </span><span class="Delimiter">}</span> +<span id="L418" class="LineNr">418 </span><span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> +<span id="L419" class="LineNr">419 </span><span class="Normal">case</span> INTERACTIONS_LEFT: <span class="Delimiter">{</span> +<span id="L420" class="LineNr">420 </span> <a href='080display.cc.html#L20'>CHECK_CONSOLE</a><span class="Delimiter">;</span> +<span id="L421" class="LineNr">421 </span> products<span class="Delimiter">.</span>resize<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> +<span id="L422" class="LineNr">422 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>tb_event_ready<span class="Delimiter">());</span> +<span id="L423" class="LineNr">423 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L424" class="LineNr">424 </span><span class="Delimiter">}</span> +<span id="L425" class="LineNr">425 </span> +<span id="L426" class="LineNr">426 </span><span class="Comment">//: hacks to make text-mode apps more responsive under Unix</span> +<span id="L427" class="LineNr">427 </span> +<span id="L428" class="LineNr">428 </span><span class="Delimiter">:(before "End Primitive Recipe Declarations")</span> +<span id="L429" class="LineNr">429 </span>CLEAR_LINE_ON_DISPLAY<span class="Delimiter">,</span> +<span id="L430" class="LineNr">430 </span><span class="Delimiter">:(before "End Primitive Recipe Numbers")</span> +<span id="L431" class="LineNr">431 </span><a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"clear-line-on-display"</span><span class="Delimiter">,</span> CLEAR_LINE_ON_DISPLAY<span class="Delimiter">);</span> +<span id="L432" class="LineNr">432 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> +<span id="L433" class="LineNr">433 </span><span class="Normal">case</span> CLEAR_LINE_ON_DISPLAY: <span class="Delimiter">{</span> +<span id="L434" class="LineNr">434 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L435" class="LineNr">435 </span><span class="Delimiter">}</span> +<span id="L436" class="LineNr">436 </span><span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> +<span id="L437" class="LineNr">437 </span><span class="Normal">case</span> CLEAR_LINE_ON_DISPLAY: <span class="Delimiter">{</span> +<span id="L438" class="LineNr">438 </span> <a href='080display.cc.html#L12'>CHECK_SCREEN</a><span class="Delimiter">;</span> +<span id="L439" class="LineNr">439 </span> <span class="Normal">int</span> width = tb_width<span class="Delimiter">();</span> +<span id="L440" class="LineNr">440 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> x = Display_column<span class="Delimiter">;</span> x < width<span class="Delimiter">;</span> ++x<span class="Delimiter">)</span> +<span id="L441" class="LineNr">441 </span> <span class="Conceal">¦</span> tb_print<span class="Delimiter">(</span><span class="Constant">' '</span><span class="Delimiter">,</span> TB_WHITE<span class="Delimiter">,</span> TB_BLACK<span class="Delimiter">);</span> +<span id="L442" class="LineNr">442 </span> tb_set_cursor<span class="Delimiter">(</span>Display_column<span class="Delimiter">,</span> Display_row<span class="Delimiter">);</span> +<span id="L443" class="LineNr">443 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L444" class="LineNr">444 </span><span class="Delimiter">}</span> +<span id="L445" class="LineNr">445 </span> +<span id="L446" class="LineNr">446 </span><span class="Delimiter">:(before "End Primitive Recipe Declarations")</span> +<span id="L447" class="LineNr">447 </span>CLEAR_DISPLAY_FROM<span class="Delimiter">,</span> +<span id="L448" class="LineNr">448 </span><span class="Delimiter">:(before "End Primitive Recipe Numbers")</span> +<span id="L449" class="LineNr">449 </span><a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"clear-display-from"</span><span class="Delimiter">,</span> CLEAR_DISPLAY_FROM<span class="Delimiter">);</span> +<span id="L450" class="LineNr">450 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> +<span id="L451" class="LineNr">451 </span><span class="Normal">case</span> CLEAR_DISPLAY_FROM: <span class="Delimiter">{</span> +<span id="L452" class="LineNr">452 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L453" class="LineNr">453 </span><span class="Delimiter">}</span> +<span id="L454" class="LineNr">454 </span><span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> +<span id="L455" class="LineNr">455 </span><span class="Normal">case</span> CLEAR_DISPLAY_FROM: <span class="Delimiter">{</span> +<span id="L456" class="LineNr">456 </span> <a href='080display.cc.html#L12'>CHECK_SCREEN</a><span class="Delimiter">;</span> +<span id="L457" class="LineNr">457 </span> <span class="Comment">// todo: error checking</span> +<span id="L458" class="LineNr">458 </span> <span class="Normal">int</span> row = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L459" class="LineNr">459 </span> <span class="Normal">int</span> column = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L460" class="LineNr">460 </span> <span class="Normal">int</span> left = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L461" class="LineNr">461 </span> <span class="Normal">int</span> right = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">3</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L462" class="LineNr">462 </span> <span class="Normal">int</span> height=tb_height<span class="Delimiter">();</span> +<span id="L463" class="LineNr">463 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">nada</span><span class="Comment">*/</span><span class="Delimiter">;</span> row < height<span class="Delimiter">;</span> ++row<span class="Delimiter">,</span> column=left<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Comment">// start column from left in every inner loop except first</span> +<span id="L464" class="LineNr">464 </span> <span class="Conceal">¦</span> tb_set_cursor<span class="Delimiter">(</span>column<span class="Delimiter">,</span> row<span class="Delimiter">);</span> +<span id="L465" class="LineNr">465 </span> <span class="Conceal">¦</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">nada</span><span class="Comment">*/</span><span class="Delimiter">;</span> column <= right<span class="Delimiter">;</span> ++column<span class="Delimiter">)</span> +<span id="L466" class="LineNr">466 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> tb_print<span class="Delimiter">(</span><span class="Constant">' '</span><span class="Delimiter">,</span> TB_WHITE<span class="Delimiter">,</span> TB_BLACK<span class="Delimiter">);</span> +<span id="L467" class="LineNr">467 </span> <span class="Delimiter">}</span> +<span id="L468" class="LineNr">468 </span> tb_set_cursor<span class="Delimiter">(</span>Display_column<span class="Delimiter">,</span> Display_row<span class="Delimiter">);</span> +<span id="L469" class="LineNr">469 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L470" class="LineNr">470 </span><span class="Delimiter">}</span> </pre> </body> </html> |