diff options
Diffstat (limited to 'html/509bezier.mu.html')
-rw-r--r-- | html/509bezier.mu.html | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/html/509bezier.mu.html b/html/509bezier.mu.html index a956621f..1f00a2eb 100644 --- a/html/509bezier.mu.html +++ b/html/509bezier.mu.html @@ -15,9 +15,13 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color: a { color:inherit; } * { font-size:12pt; font-size: 1em; } .PreProc { color: #c000c0; } +.muRegEcx { color: #af875f; } .Special { color: #ff6060; } .LineNr { } +.muRegEbx { color: #8787af; } +.muRegEdx { color: #878700; } .Constant { color: #008787; } +.muRegEax { color: #875f00; } .Delimiter { color: #c000c0; } .muFunction { color: #af5f00; text-decoration: underline; } .muComment { color: #005faf; } @@ -76,7 +80,7 @@ if ('onhashchange' in window) { <span id="L18" class="LineNr"> 18 </span> <span class="PreProc">var</span> sx: int <span id="L19" class="LineNr"> 19 </span> <span class="PreProc">var</span> sy: int <span id="L20" class="LineNr"> 20 </span> <span class="muComment"># sx = x2-x1</span> -<span id="L21" class="LineNr"> 21 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: int <span class="Special"><-</span> copy x2 +<span id="L21" class="LineNr"> 21 </span> <span class="PreProc">var</span> tmp/<span class="muRegEax">eax</span>: int <span class="Special"><-</span> copy x2 <span id="L22" class="LineNr"> 22 </span> tmp <span class="Special"><-</span> subtract x1 <span id="L23" class="LineNr"> 23 </span> copy-to sx, tmp <span id="L24" class="LineNr"> 24 </span> <span class="muComment"># sy = y2-y1</span> @@ -120,7 +124,7 @@ if ('onhashchange' in window) { <span id="L62" class="LineNr"> 62 </span> <span class="muComment"># swap P0 and P2 if necessary</span> <span id="L63" class="LineNr"> 63 </span> <span class="Delimiter">{</span> <span id="L64" class="LineNr"> 64 </span> <span class="muComment"># dist1 = sx*sx + sy*sy</span> -<span id="L65" class="LineNr"> 65 </span> <span class="PreProc">var</span> dist1/<span class="Constant">ecx</span>: int <span class="Special"><-</span> copy sx +<span id="L65" class="LineNr"> 65 </span> <span class="PreProc">var</span> dist1/<span class="muRegEcx">ecx</span>: int <span class="Special"><-</span> copy sx <span id="L66" class="LineNr"> 66 </span> <span class="Delimiter">{</span> <span id="L67" class="LineNr"> 67 </span> dist1 <span class="Special"><-</span> multiply sx <span id="L68" class="LineNr"> 68 </span> <span class="Delimiter">{</span> @@ -136,7 +140,7 @@ if ('onhashchange' in window) { <span id="L78" class="LineNr"> 78 </span> dist1 <span class="Special"><-</span> add tmp <span id="L79" class="LineNr"> 79 </span> <span class="Delimiter">}</span> <span id="L80" class="LineNr"> 80 </span> <span class="muComment"># dist2 = xx*xx + yy*yy</span> -<span id="L81" class="LineNr"> 81 </span> <span class="PreProc">var</span> dist2/<span class="Constant">edx</span>: int <span class="Special"><-</span> copy xx +<span id="L81" class="LineNr"> 81 </span> <span class="PreProc">var</span> dist2/<span class="muRegEdx">edx</span>: int <span class="Special"><-</span> copy xx <span id="L82" class="LineNr"> 82 </span> <span class="Delimiter">{</span> <span id="L83" class="LineNr"> 83 </span> dist2 <span class="Special"><-</span> multiply xx <span id="L84" class="LineNr"> 84 </span> <span class="Delimiter">{</span> @@ -167,12 +171,12 @@ if ('onhashchange' in window) { <span id="L109" class="LineNr">109 </span> tmp <span class="Special"><-</span> add y1 <span id="L110" class="LineNr">110 </span> copy-to y0, tmp <span id="L111" class="LineNr">111 </span> <span class="muComment"># cur = -cur</span> -<span id="L112" class="LineNr">112 </span> <span class="PreProc">var</span> negative-1/<span class="Constant">eax</span>: int <span class="Special"><-</span> copy <span class="Constant">-1</span> +<span id="L112" class="LineNr">112 </span> <span class="PreProc">var</span> negative-1/<span class="muRegEax">eax</span>: int <span class="Special"><-</span> copy <span class="Constant">-1</span> <span id="L113" class="LineNr">113 </span> <span class="PreProc">var</span> negative-1-f/<span class="Constant">xmm1</span>: float <span class="Special"><-</span> convert negative-1 <span id="L114" class="LineNr">114 </span> cur-f <span class="Special"><-</span> multiply negative-1-f <span id="L115" class="LineNr">115 </span> <span class="Delimiter">}</span> -<span id="L116" class="LineNr">116 </span> <span class="PreProc">var</span> x/<span class="Constant">ecx</span>: int <span class="Special"><-</span> copy x0 -<span id="L117" class="LineNr">117 </span> <span class="PreProc">var</span> y/<span class="Constant">edx</span>: int <span class="Special"><-</span> copy y0 +<span id="L116" class="LineNr">116 </span> <span class="PreProc">var</span> x/<span class="muRegEcx">ecx</span>: int <span class="Special"><-</span> copy x0 +<span id="L117" class="LineNr">117 </span> <span class="PreProc">var</span> y/<span class="muRegEdx">edx</span>: int <span class="Special"><-</span> copy y0 <span id="L118" class="LineNr">118 </span> <span class="PreProc">var</span> zero-f: float <span id="L119" class="LineNr">119 </span> <span class="muComment"># plot a curved part if necessary</span> <span id="L120" class="LineNr">120 </span> $draw-monotonic-bezier:curve: <span class="Delimiter">{</span> @@ -245,11 +249,11 @@ if ('onhashchange' in window) { <span id="L187" class="LineNr">187 </span> negate yy <span id="L188" class="LineNr">188 </span> negate xy <span id="L189" class="LineNr">189 </span> <span class="muComment"># cur = -cur</span> -<span id="L190" class="LineNr">190 </span> <span class="PreProc">var</span> negative-1/<span class="Constant">eax</span>: int <span class="Special"><-</span> copy <span class="Constant">-1</span> +<span id="L190" class="LineNr">190 </span> <span class="PreProc">var</span> negative-1/<span class="muRegEax">eax</span>: int <span class="Special"><-</span> copy <span class="Constant">-1</span> <span id="L191" class="LineNr">191 </span> <span class="PreProc">var</span> negative-1-f/<span class="Constant">xmm1</span>: float <span class="Special"><-</span> convert negative-1 <span id="L192" class="LineNr">192 </span> cur-f <span class="Special"><-</span> multiply negative-1-f <span id="L193" class="LineNr">193 </span> <span class="Delimiter">}</span> -<span id="L194" class="LineNr">194 </span> <span class="PreProc">var</span> four/<span class="Constant">ebx</span>: int <span class="Special"><-</span> copy <span class="Constant">4</span> +<span id="L194" class="LineNr">194 </span> <span class="PreProc">var</span> four/<span class="muRegEbx">ebx</span>: int <span class="Special"><-</span> copy <span class="Constant">4</span> <span id="L195" class="LineNr">195 </span> <span class="PreProc">var</span> dx-f/<span class="Constant">xmm5</span>: float <span class="Special"><-</span> convert four <span id="L196" class="LineNr">196 </span> <span class="PreProc">var</span> dy-f/<span class="Constant">xmm6</span>: float <span class="Special"><-</span> convert four <span id="L197" class="LineNr">197 </span> <span class="muComment"># dx = 4*sy*cur*(x1-x0) + xx - xy</span> @@ -293,7 +297,7 @@ if ('onhashchange' in window) { <span id="L235" class="LineNr">235 </span> err-f <span class="Special"><-</span> add xy-f <span id="L236" class="LineNr">236 </span> <span class="muComment">#</span> <span id="L237" class="LineNr">237 </span> $draw-monotonic-bezier:<span class="PreProc">loop</span>: <span class="Delimiter">{</span> -<span id="L238" class="LineNr">238 </span> <a href='500fake-screen.mu.html#L463'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y, color +<span id="L238" class="LineNr">238 </span> <a href='500fake-screen.mu.html#L483'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y, color <span id="L239" class="LineNr">239 </span> <span class="muComment"># if (x == x2 && y == y2) return</span> <span id="L240" class="LineNr">240 </span> <span class="Delimiter">{</span> <span id="L241" class="LineNr">241 </span> compare x, x2 @@ -303,10 +307,10 @@ if ('onhashchange' in window) { <span id="L245" class="LineNr">245 </span> <span class="PreProc">return</span> <span id="L246" class="LineNr">246 </span> <span class="Delimiter">}</span> <span id="L247" class="LineNr">247 </span> <span class="muComment"># perform-y-step? = (2*err < dx)</span> -<span id="L248" class="LineNr">248 </span> <span class="PreProc">var</span> perform-y-step?/<span class="Constant">eax</span>: boolean <span class="Special"><-</span> copy <span class="Constant">0</span>/false +<span id="L248" class="LineNr">248 </span> <span class="PreProc">var</span> perform-y-step?/<span class="muRegEax">eax</span>: boolean <span class="Special"><-</span> copy <span class="Constant">0</span>/false <span id="L249" class="LineNr">249 </span> <span class="PreProc">var</span> two-err-f/<span class="Constant">xmm0</span>: float <span class="Special"><-</span> copy err-f <span id="L250" class="LineNr">250 </span> <span class="Delimiter">{</span> -<span id="L251" class="LineNr">251 </span> <span class="PreProc">var</span> two/<span class="Constant">ebx</span>: int <span class="Special"><-</span> copy <span class="Constant">2</span> +<span id="L251" class="LineNr">251 </span> <span class="PreProc">var</span> two/<span class="muRegEbx">ebx</span>: int <span class="Special"><-</span> copy <span class="Constant">2</span> <span id="L252" class="LineNr">252 </span> <span class="PreProc">var</span> two-f/<span class="Constant">xmm1</span>: float <span class="Special"><-</span> convert two <span id="L253" class="LineNr">253 </span> two-err-f <span class="Special"><-</span> multiply two-f <span id="L254" class="LineNr">254 </span> compare two-err-f, dx-f @@ -353,8 +357,8 @@ if ('onhashchange' in window) { <span id="L295" class="LineNr">295 </span><span class="Delimiter">}</span> <span id="L296" class="LineNr">296 </span> <span id="L297" class="LineNr">297 </span><span class="muComment"># 0 <= u <= 1</span> -<span id="L298" class="LineNr">298 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='509bezier.mu.html#L298'>bezier-point</a></span> u: float, x0: int, x1: int, x2: int<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span> -<span id="L299" class="LineNr">299 </span> <span class="PreProc">var</span> one/<span class="Constant">eax</span>: int <span class="Special"><-</span> copy <span class="Constant">1</span> +<span id="L298" class="LineNr">298 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='509bezier.mu.html#L298'>bezier-point</a></span> u: float, x0: int, x1: int, x2: int<span class="PreProc"> -> </span>_/<span class="muRegEax">eax</span>: int <span class="Delimiter">{</span> +<span id="L299" class="LineNr">299 </span> <span class="PreProc">var</span> one/<span class="muRegEax">eax</span>: int <span class="Special"><-</span> copy <span class="Constant">1</span> <span id="L300" class="LineNr">300 </span> <span class="PreProc">var</span> u-prime/<span class="Constant">xmm0</span>: float <span class="Special"><-</span> convert one <span id="L301" class="LineNr">301 </span> u-prime <span class="Special"><-</span> subtract u <span id="L302" class="LineNr">302 </span> <span class="PreProc">var</span> result/<span class="Constant">xmm1</span>: float <span class="Special"><-</span> convert x0 @@ -369,7 +373,7 @@ if ('onhashchange' in window) { <span id="L311" class="LineNr">311 </span> term3 <span class="Special"><-</span> multiply u <span id="L312" class="LineNr">312 </span> term3 <span class="Special"><-</span> multiply u <span id="L313" class="LineNr">313 </span> result <span class="Special"><-</span> add term3 -<span id="L314" class="LineNr">314 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="Special"><-</span> convert result +<span id="L314" class="LineNr">314 </span> <span class="PreProc">var</span> result/<span class="muRegEax">eax</span>: int <span class="Special"><-</span> convert result <span id="L315" class="LineNr">315 </span> <span class="PreProc">return</span> result <span id="L316" class="LineNr">316 </span><span class="Delimiter">}</span> </pre> |