Add eyedropper tool to 32BitPaint app.

This commit is contained in:
TomAwezome 2021-07-15 20:46:58 -04:00
parent 584b5899d3
commit 42dc3a16f6
4 changed files with 178 additions and 156 deletions

View file

@ -161,146 +161,157 @@ body {background-color:#000000;}
<a name="l134"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(</span><span class=cFB>text</span><span class=cF0>.fb_alias, paint.fb, </span><span class=cFB>text</span><span class=cF0>.buffer_size);
<a name="l135"></a>}
<a name="l136"></a>
<a name="l137"></a></span><span class=cF1>I0</span><span class=cF0> Paint32()
<a name="l137"></a></span><span class=cF9>U32</span><span class=cF0> PaintImagePeek(</span><span class=cF9>I64</span><span class=cF0> x, </span><span class=cF9>I64</span><span class=cF0> y)
<a name="l138"></a>{
<a name="l139"></a> </span><span class=cF9>I64</span><span class=cF0> sc, ch, i, j, sc_space = </span><span class=cF5>Char2ScanCode</span><span class=cF0>(</span><span class=cF3>CH_SPACE</span><span class=cF0>);
<a name="l140"></a> </span><span class=cF1>U8</span><span class=cF0> str_r[</span><span class=cF3>STR_LEN</span><span class=cF0>],
<a name="l141"></a> str_g[</span><span class=cF3>STR_LEN</span><span class=cF0>],
<a name="l142"></a> str_b[</span><span class=cF3>STR_LEN</span><span class=cF0>];
<a name="l143"></a>
<a name="l144"></a> </span><span class=cF5>SettingsPush</span><span class=cF0>; </span><span class=cF2>//See </span><a href="https://tomawezome.github.io/ZealOS/System/TaskSettings.CC.html#l3"><span class=cF4>SettingsPush</span></a><span class=cF0>
<a name="l145"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
<a name="l146"></a> </span><span class=cF5>WinBorder</span><span class=cF0>;
<a name="l147"></a> </span><span class=cF5>WinMax</span><span class=cF0>;
<a name="l148"></a> </span><span class=cF5>DocCursor</span><span class=cF0>;
<a name="l149"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
<a name="l150"></a> </span><span class=cF5>MenuPush</span><span class=cF0>(</span><span class=cF6>&quot;&quot;</span><span class=cF0>);
<a name="l151"></a>
<a name="l152"></a> </span><span class=cF5>PopUpOk</span><span class=cF0>(</span><span class=cF6>&quot;\n&quot;</span><span class=cF0>
<a name="l153"></a> </span><span class=cF6>&quot;$GREEN$0-9$FG$ to get colors from current palette.\n&quot;</span><span class=cF0>
<a name="l154"></a> </span><span class=cF6>&quot;$GREEN$R, G, or B$FG$ to increase color values.\n&quot;</span><span class=cF0>
<a name="l155"></a> </span><span class=cF6>&quot;$GREEN$Shift-R, Shift-G, or Shift-B$FG$ to decrease.\n&quot;</span><span class=cF0>
<a name="l156"></a> </span><span class=cF6>&quot;$GREEN$+ or -$FG$ to change brush size.\n\n&quot;</span><span class=cF0>
<a name="l157"></a> </span><span class=cF6>&quot;$BLUE$Ctrl-S$FG$ to save image.\n&quot;</span><span class=cF0>
<a name="l158"></a> </span><span class=cF6>&quot;$BLUE$Ctrl-L$FG$ to load image.\n\n&quot;</span><span class=cF0>
<a name="l159"></a> </span><span class=cF6>&quot;$GREEN$Left-click or SPACE$FG$ to draw.\n\n&quot;</span><span class=cF0>
<a name="l160"></a> </span><span class=cF6>&quot;$RED$ENTER$FG$ to clear image.\n&quot;</span><span class=cF0>
<a name="l161"></a> </span><span class=cF6>&quot;$RED$Shift-Esc or Double Right-Click$FG$ to exit.&quot;</span><span class=cF0>);
<a name="l162"></a> </span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cFE>250</span><span class=cF0>); </span><span class=cF2>// help ensure SPACE press doesn't draw early</span><span class=cF0>
<a name="l163"></a>
<a name="l164"></a> </span><span class=cFB>text</span><span class=cF0>.is_fb_busy = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l165"></a> </span><span class=cF5>MemSet</span><span class=cF0>(</span><span class=cFB>text</span><span class=cF0>.fb_alias, </span><span class=cF3>WHITE32</span><span class=cF0>, </span><span class=cFB>text</span><span class=cF0>.buffer_size);
<a name="l166"></a> </span><span class=cF5>MemSet</span><span class=cF0>(paint.fb, </span><span class=cF3>WHITE32</span><span class=cF0>, </span><span class=cFB>text</span><span class=cF0>.buffer_size);
<a name="l167"></a>
<a name="l168"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
<a name="l169"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l170"></a> </span><span class=cF2>// draw the image where the brush was last covering it</span><span class=cF0>
<a name="l171"></a> </span><span class=cF1>for</span><span class=cF0> (i = paint.last_x; i &lt; paint.last_x + paint.last_thick; i++)
<a name="l172"></a> </span><span class=cF1>for</span><span class=cF0> (j = paint.last_y; j &lt; paint.last_y + paint.last_thick; j++)
<a name="l173"></a> DrawScreenPixel(i, j, paint.fb[i + j * </span><span class=cF3>GR_WIDTH</span><span class=cF0>]);
<a name="l174"></a>
<a name="l175"></a> </span><span class=cF2>// draw the brush on the screen</span><span class=cF0>
<a name="l176"></a> DrawScreenBrush(</span><span class=cFB>mouse</span><span class=cF0>.pos.x, </span><span class=cFB>mouse</span><span class=cF0>.pos.y, paint.color, paint.thick);
<a name="l177"></a>
<a name="l178"></a> </span><span class=cF2>// if clicked, draw brush on the image</span><span class=cF0>
<a name="l179"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>mouse</span><span class=cF0>.lb || </span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>kbd</span><span class=cF0>.down_bitmap, sc_space</span><span class=cF7>)</span><span class=cF0>)
<a name="l180"></a> DrawImageBrush(</span><span class=cFB>mouse</span><span class=cF0>.pos.x, </span><span class=cFB>mouse</span><span class=cF0>.pos.y, paint.color, paint.thick);
<a name="l181"></a>
<a name="l182"></a> </span><span class=cF2>// build the color strings (U8[], no MAlloc)</span><span class=cF0>
<a name="l183"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(str_r, </span><span class=cF6>&quot;Red: %d&quot;</span><span class=cF0>, paint.color.r);
<a name="l184"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(str_g, </span><span class=cF6>&quot;Green: %d&quot;</span><span class=cF0>, paint.color.g);
<a name="l185"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(str_b, </span><span class=cF6>&quot;Blue: %d&quot;</span><span class=cF0>, paint.color.b);
<a name="l186"></a>
<a name="l187"></a> </span><span class=cF2>// draw the image where the color strings where covering it </span><span class=cF0>
<a name="l188"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; </span><span class=cFE>3</span><span class=cF0> * </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>; i++)
<a name="l189"></a> </span><span class=cF1>for</span><span class=cF0> (j = </span><span class=cFE>0</span><span class=cF0>; j &lt; </span><span class=cFE>12</span><span class=cF0> * </span><span class=cF3>FONT_WIDTH</span><span class=cF0>; j++)
<a name="l190"></a> DrawScreenPixel(j, i, paint.fb[j + i * </span><span class=cF3>GR_WIDTH</span><span class=cF0>]);
<a name="l191"></a>
<a name="l192"></a> </span><span class=cF2>// draw the color strings on screen</span><span class=cF0>
<a name="l193"></a> DrawScreenStr(</span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0> * </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>, str_r);
<a name="l194"></a> DrawScreenStr(</span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>1</span><span class=cF0> * </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>, str_g);
<a name="l195"></a> DrawScreenStr(</span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>2</span><span class=cF0> * </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>, str_b);
<a name="l196"></a>
<a name="l197"></a> </span><span class=cF2>// 60fps wait</span><span class=cF0>
<a name="l198"></a> </span><span class=cF5>Refresh</span><span class=cF0>;
<a name="l199"></a>
<a name="l200"></a> </span><span class=cF2>// Get key, process</span><span class=cF0>
<a name="l201"></a> </span><span class=cF5>KeyScan</span><span class=cF0>(&amp;ch, &amp;sc);
<a name="l202"></a> </span><span class=cF1>switch</span><span class=cF0> (ch)
<a name="l203"></a> {
<a name="l204"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cFE>0</span><span class=cF0>:
<a name="l205"></a> </span><span class=cF1>switch</span><span class=cF0> (sc.u8[</span><span class=cFE>0</span><span class=cF0>])
<a name="l206"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l207"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SC_CURSOR_LEFT</span><span class=cF0>:
<a name="l208"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l209"></a>
<a name="l210"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SC_CURSOR_RIGHT</span><span class=cF0>:
<a name="l211"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l212"></a>
<a name="l213"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SC_CURSOR_UP</span><span class=cF0>:
<a name="l214"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l215"></a>
<a name="l216"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SC_CURSOR_DOWN</span><span class=cF0>:
<a name="l217"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l218"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l219"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l220"></a>
<a name="l221"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'+'</span><span class=cF0>:
<a name="l222"></a> paint.thick++;
<a name="l223"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l224"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'-'</span><span class=cF0>:
<a name="l225"></a> paint.thick--;
<a name="l226"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l227"></a>
<a name="l228"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'r'</span><span class=cF0>:
<a name="l229"></a> paint.color.r++;
<a name="l139"></a> </span><span class=cF1>return</span><span class=cF0> paint.fb[x + y * </span><span class=cF3>GR_WIDTH</span><span class=cF0>];
<a name="l140"></a>}
<a name="l141"></a>
<a name="l142"></a></span><span class=cF1>I0</span><span class=cF0> Paint32()
<a name="l143"></a>{
<a name="l144"></a> </span><span class=cF9>I64</span><span class=cF0> sc, ch, i, j, sc_space = </span><span class=cF5>Char2ScanCode</span><span class=cF0>(</span><span class=cF3>CH_SPACE</span><span class=cF0>);
<a name="l145"></a> </span><span class=cF1>U8</span><span class=cF0> str_r[</span><span class=cF3>STR_LEN</span><span class=cF0>],
<a name="l146"></a> str_g[</span><span class=cF3>STR_LEN</span><span class=cF0>],
<a name="l147"></a> str_b[</span><span class=cF3>STR_LEN</span><span class=cF0>];
<a name="l148"></a>
<a name="l149"></a> </span><span class=cF5>SettingsPush</span><span class=cF0>; </span><span class=cF2>//See </span><a href="https://tomawezome.github.io/ZealOS/System/TaskSettings.CC.html#l3"><span class=cF4>SettingsPush</span></a><span class=cF0>
<a name="l150"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
<a name="l151"></a> </span><span class=cF5>WinBorder</span><span class=cF0>;
<a name="l152"></a> </span><span class=cF5>WinMax</span><span class=cF0>;
<a name="l153"></a> </span><span class=cF5>DocCursor</span><span class=cF0>;
<a name="l154"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
<a name="l155"></a> </span><span class=cF5>MenuPush</span><span class=cF0>(</span><span class=cF6>&quot;&quot;</span><span class=cF0>);
<a name="l156"></a>
<a name="l157"></a> </span><span class=cF5>PopUpOk</span><span class=cF0>(</span><span class=cF6>&quot;\n&quot;</span><span class=cF0>
<a name="l158"></a> </span><span class=cF6>&quot;$GREEN$0-9$FG$ to get colors from current palette.\n&quot;</span><span class=cF0>
<a name="l159"></a> </span><span class=cF6>&quot;$GREEN$R, G, or B$FG$ to increase color values.\n&quot;</span><span class=cF0>
<a name="l160"></a> </span><span class=cF6>&quot;$GREEN$Shift-R, Shift-G, or Shift-B$FG$ to decrease.\n&quot;</span><span class=cF0>
<a name="l161"></a> </span><span class=cF6>&quot;$GREEN$+ or -$FG$ to change brush size.\n&quot;</span><span class=cF0>
<a name="l162"></a> </span><span class=cF6>&quot;$GREEN$Alt$FG$ to peek (eyedropper) color under brush.\n\n&quot;</span><span class=cF0>
<a name="l163"></a> </span><span class=cF6>&quot;$BLUE$Ctrl-S$FG$ to save image.\n&quot;</span><span class=cF0>
<a name="l164"></a> </span><span class=cF6>&quot;$BLUE$Ctrl-L$FG$ to load image.\n\n&quot;</span><span class=cF0>
<a name="l165"></a> </span><span class=cF6>&quot;$GREEN$Left-click or SPACE$FG$ to draw.\n\n&quot;</span><span class=cF0>
<a name="l166"></a> </span><span class=cF6>&quot;$RED$ENTER$FG$ to clear image.\n&quot;</span><span class=cF0>
<a name="l167"></a> </span><span class=cF6>&quot;$RED$Shift-Esc or Double Right-Click$FG$ to exit.&quot;</span><span class=cF0>);
<a name="l168"></a> </span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cFE>250</span><span class=cF0>); </span><span class=cF2>// help ensure SPACE press doesn't draw early</span><span class=cF0>
<a name="l169"></a>
<a name="l170"></a> </span><span class=cFB>text</span><span class=cF0>.is_fb_busy = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l171"></a> </span><span class=cF5>MemSet</span><span class=cF0>(</span><span class=cFB>text</span><span class=cF0>.fb_alias, </span><span class=cF3>WHITE32</span><span class=cF0>, </span><span class=cFB>text</span><span class=cF0>.buffer_size);
<a name="l172"></a> </span><span class=cF5>MemSet</span><span class=cF0>(paint.fb, </span><span class=cF3>WHITE32</span><span class=cF0>, </span><span class=cFB>text</span><span class=cF0>.buffer_size);
<a name="l173"></a>
<a name="l174"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
<a name="l175"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l176"></a> </span><span class=cF2>// draw the image where the brush was last covering it</span><span class=cF0>
<a name="l177"></a> </span><span class=cF1>for</span><span class=cF0> (i = paint.last_x; i &lt; paint.last_x + paint.last_thick; i++)
<a name="l178"></a> </span><span class=cF1>for</span><span class=cF0> (j = paint.last_y; j &lt; paint.last_y + paint.last_thick; j++)
<a name="l179"></a> DrawScreenPixel(i, j, paint.fb[i + j * </span><span class=cF3>GR_WIDTH</span><span class=cF0>]);
<a name="l180"></a>
<a name="l181"></a> </span><span class=cF2>// draw the brush on the screen</span><span class=cF0>
<a name="l182"></a> DrawScreenBrush(</span><span class=cFB>mouse</span><span class=cF0>.pos.x, </span><span class=cFB>mouse</span><span class=cF0>.pos.y, paint.color, paint.thick);
<a name="l183"></a>
<a name="l184"></a> </span><span class=cF2>// if clicked, draw brush on the image</span><span class=cF0>
<a name="l185"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>mouse</span><span class=cF0>.lb || </span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>kbd</span><span class=cF0>.down_bitmap, sc_space</span><span class=cF7>)</span><span class=cF0>)
<a name="l186"></a> DrawImageBrush(</span><span class=cFB>mouse</span><span class=cF0>.pos.x, </span><span class=cFB>mouse</span><span class=cF0>.pos.y, paint.color, paint.thick);
<a name="l187"></a>
<a name="l188"></a> </span><span class=cF2>// build the color strings (U8[], no MAlloc)</span><span class=cF0>
<a name="l189"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(str_r, </span><span class=cF6>&quot;Red: %d&quot;</span><span class=cF0>, paint.color.r);
<a name="l190"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(str_g, </span><span class=cF6>&quot;Green: %d&quot;</span><span class=cF0>, paint.color.g);
<a name="l191"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(str_b, </span><span class=cF6>&quot;Blue: %d&quot;</span><span class=cF0>, paint.color.b);
<a name="l192"></a>
<a name="l193"></a> </span><span class=cF2>// draw the image where the color strings where covering it </span><span class=cF0>
<a name="l194"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; </span><span class=cFE>3</span><span class=cF0> * </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>; i++)
<a name="l195"></a> </span><span class=cF1>for</span><span class=cF0> (j = </span><span class=cFE>0</span><span class=cF0>; j &lt; </span><span class=cFE>12</span><span class=cF0> * </span><span class=cF3>FONT_WIDTH</span><span class=cF0>; j++)
<a name="l196"></a> DrawScreenPixel(j, i, paint.fb[j + i * </span><span class=cF3>GR_WIDTH</span><span class=cF0>]);
<a name="l197"></a>
<a name="l198"></a> </span><span class=cF2>// draw the color strings on screen</span><span class=cF0>
<a name="l199"></a> DrawScreenStr(</span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0> * </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>, str_r);
<a name="l200"></a> DrawScreenStr(</span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>1</span><span class=cF0> * </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>, str_g);
<a name="l201"></a> DrawScreenStr(</span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>2</span><span class=cF0> * </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>, str_b);
<a name="l202"></a>
<a name="l203"></a> </span><span class=cF2>// 60fps wait</span><span class=cF0>
<a name="l204"></a> </span><span class=cF5>Refresh</span><span class=cF0>;
<a name="l205"></a>
<a name="l206"></a> </span><span class=cF2>// Get key, process</span><span class=cF0>
<a name="l207"></a> </span><span class=cF5>KeyScan</span><span class=cF0>(&amp;ch, &amp;sc);
<a name="l208"></a> </span><span class=cF1>switch</span><span class=cF0> (ch)
<a name="l209"></a> {
<a name="l210"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cFE>0</span><span class=cF0>:
<a name="l211"></a> </span><span class=cF1>switch</span><span class=cF0> (sc.u8[</span><span class=cFE>0</span><span class=cF0>])
<a name="l212"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l213"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SC_ALT</span><span class=cF0>:
<a name="l214"></a> paint.color = PaintImagePeek(</span><span class=cFB>mouse</span><span class=cF0>.pos.x, </span><span class=cFB>mouse</span><span class=cF0>.pos.y);
<a name="l215"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l216"></a>
<a name="l217"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SC_CURSOR_LEFT</span><span class=cF0>:
<a name="l218"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l219"></a>
<a name="l220"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SC_CURSOR_RIGHT</span><span class=cF0>:
<a name="l221"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l222"></a>
<a name="l223"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SC_CURSOR_UP</span><span class=cF0>:
<a name="l224"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l225"></a>
<a name="l226"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SC_CURSOR_DOWN</span><span class=cF0>:
<a name="l227"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l228"></a>
<a name="l229"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l230"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l231"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'g'</span><span class=cF0>:
<a name="l232"></a> paint.color.g++;
<a name="l233"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l234"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'b'</span><span class=cF0>:
<a name="l235"></a> paint.color.b++;
<a name="l236"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l237"></a>
<a name="l238"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'R'</span><span class=cF0>:
<a name="l239"></a> paint.color.r--;
<a name="l240"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l241"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'G'</span><span class=cF0>:
<a name="l242"></a> paint.color.g--;
<a name="l243"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l244"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'B'</span><span class=cF0>:
<a name="l245"></a> paint.color.b--;
<a name="l246"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l247"></a>
<a name="l248"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'0'</span><span class=cF0>...</span><span class=cF6>'9'</span><span class=cF0>:
<a name="l249"></a> paint.color = </span><span class=cFB>gr_palette</span><span class=cF0>[ch - </span><span class=cF6>'0'</span><span class=cF0>];
<a name="l250"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l251"></a>
<a name="l252"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'\n'</span><span class=cF0>:
<a name="l253"></a> </span><span class=cF5>MemSet</span><span class=cF0>(paint.fb, </span><span class=cF3>WHITE32</span><span class=cF0>, </span><span class=cFB>text</span><span class=cF0>.buffer_size);
<a name="l254"></a> </span><span class=cF5>MemSet</span><span class=cF0>(</span><span class=cFB>text</span><span class=cF0>.fb_alias, </span><span class=cF3>WHITE32</span><span class=cF0>, </span><span class=cFB>text</span><span class=cF0>.buffer_size);
<a name="l255"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l256"></a>
<a name="l257"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_CTRLS</span><span class=cF0>:
<a name="l258"></a> PaintSaveImage;
<a name="l259"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l260"></a>
<a name="l261"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_CTRLL</span><span class=cF0>:
<a name="l262"></a> PaintLoadImage;
<a name="l263"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l264"></a>
<a name="l265"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>:
<a name="l266"></a> </span><span class=cF1>goto</span><span class=cF0> paint_done;
<a name="l267"></a> }
<a name="l268"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l269"></a>
<a name="l270"></a>paint_done:
<a name="l271"></a> </span><span class=cFB>text</span><span class=cF0>.is_fb_busy = </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l272"></a> </span><span class=cF5>LFBFlush</span><span class=cF0>;
<a name="l273"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
<a name="l274"></a> </span><span class=cF5>MenuPop</span><span class=cF0>;
<a name="l275"></a>}
<a name="l276"></a>
<a name="l277"></a>PaintGlobalsInit;
<a name="l278"></a>Paint32;</span></pre></body>
<a name="l231"></a>
<a name="l232"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'+'</span><span class=cF0>:
<a name="l233"></a> paint.thick++;
<a name="l234"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l235"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'-'</span><span class=cF0>:
<a name="l236"></a> paint.thick--;
<a name="l237"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l238"></a>
<a name="l239"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'r'</span><span class=cF0>:
<a name="l240"></a> paint.color.r++;
<a name="l241"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l242"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'g'</span><span class=cF0>:
<a name="l243"></a> paint.color.g++;
<a name="l244"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l245"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'b'</span><span class=cF0>:
<a name="l246"></a> paint.color.b++;
<a name="l247"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l248"></a>
<a name="l249"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'R'</span><span class=cF0>:
<a name="l250"></a> paint.color.r--;
<a name="l251"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l252"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'G'</span><span class=cF0>:
<a name="l253"></a> paint.color.g--;
<a name="l254"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l255"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'B'</span><span class=cF0>:
<a name="l256"></a> paint.color.b--;
<a name="l257"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l258"></a>
<a name="l259"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'0'</span><span class=cF0>...</span><span class=cF6>'9'</span><span class=cF0>:
<a name="l260"></a> paint.color = </span><span class=cFB>gr_palette</span><span class=cF0>[ch - </span><span class=cF6>'0'</span><span class=cF0>];
<a name="l261"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l262"></a>
<a name="l263"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'\n'</span><span class=cF0>:
<a name="l264"></a> </span><span class=cF5>MemSet</span><span class=cF0>(paint.fb, </span><span class=cF3>WHITE32</span><span class=cF0>, </span><span class=cFB>text</span><span class=cF0>.buffer_size);
<a name="l265"></a> </span><span class=cF5>MemSet</span><span class=cF0>(</span><span class=cFB>text</span><span class=cF0>.fb_alias, </span><span class=cF3>WHITE32</span><span class=cF0>, </span><span class=cFB>text</span><span class=cF0>.buffer_size);
<a name="l266"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l267"></a>
<a name="l268"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_CTRLS</span><span class=cF0>:
<a name="l269"></a> PaintSaveImage;
<a name="l270"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l271"></a>
<a name="l272"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_CTRLL</span><span class=cF0>:
<a name="l273"></a> PaintLoadImage;
<a name="l274"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l275"></a>
<a name="l276"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>:
<a name="l277"></a> </span><span class=cF1>goto</span><span class=cF0> paint_done;
<a name="l278"></a> }
<a name="l279"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l280"></a>
<a name="l281"></a>paint_done:
<a name="l282"></a> </span><span class=cFB>text</span><span class=cF0>.is_fb_busy = </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l283"></a> </span><span class=cF5>LFBFlush</span><span class=cF0>;
<a name="l284"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
<a name="l285"></a> </span><span class=cF5>MenuPop</span><span class=cF0>;
<a name="l286"></a>}
<a name="l287"></a>
<a name="l288"></a>PaintGlobalsInit;
<a name="l289"></a>Paint32;</span></pre></body>
</html>

View file

@ -980,7 +980,7 @@ body {background-color:#000000;}
<a name="l952"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.HH.html#l2666"><span class=cF4>CPCIDev </span></a><span class=cF0>0077540438 0015 0000000054 Class
<a name="l953"></a>CPUID 00775EDF88 0008 OpCode </span><span class=cF4>
<a name="l954"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelB.HH.html#l214"><span class=cF4>CPUId </span></a><span class=cF0>000000B025 0006 Funct Public </span><span class=cF4>
<a name="l955"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/CPURep.CC.html#l28"><span class=cF4>CPURep </span></a><span class=cF0>007649BE28 0001 00000004BE Funct Public </span><span class=cF4>
<a name="l955"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/CPURep.CC.html#l28"><span class=cF4>CPURep </span></a><span class=cF0>007649BC28 0001 00000004BE Funct Public </span><span class=cF4>
<a name="l956"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/MultiProc.CC.html#l117"><span class=cF4>CPUStructInit </span></a><span class=cF0>000001F85A 0005 ExportSysSym Imm </span><span class=cF4>
<a name="l957"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.HH.html#l4058"><span class=cF4>CPUf_DYING_TASK_QUE </span></a><span class=cF0>1 0006 0000000008 DefineStr </span><span class=cF4>
<a name="l958"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.HH.html#l4057"><span class=cF4>CPUf_RAN_A_TASK </span></a><span class=cF0>0 0004 0000000008 DefineStr </span><span class=cF4>
@ -1296,7 +1296,7 @@ body {background-color:#000000;}
<a name="l1268"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KDefine.CC.html#l108"><span class=cF4>DD_MEM_MIN_MEG </span></a><span class=cF0>256Meg 0001 0000000008 DefineStr </span><span class=cF4>
<a name="l1269"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KDefine.CC.html#l108"><span class=cF4>DD_MP_VECT </span></a><span class=cF0>00097000 0000 0000000010 DefineStr </span><span class=cF4>
<a name="l1270"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KDefine.CC.html#l108"><span class=cF4>DD_MP_VECT_END </span></a><span class=cF0>00097030 0000 0000000010 DefineStr </span><span class=cF4>
<a name="l1271"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KDefine.CC.html#l108"><span class=cF4>DD_OS_NAME_VERSION </span></a><span class=cF0>ZealOS V0. 01B9 0000000010 DefineStr </span><span class=cF4>
<a name="l1271"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KDefine.CC.html#l108"><span class=cF4>DD_OS_NAME_VERSION </span></a><span class=cF0>ZealOS V0. 0165 0000000010 DefineStr </span><span class=cF4>
<a name="l1272"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KDefine.CC.html#l108"><span class=cF4>DD_PHYSICAL_SPACE_END</span></a><span class=cF0>00FFFFFFFF 0000 0000000010 DefineStr </span><span class=cF4>
<a name="l1273"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KDefine.CC.html#l108"><span class=cF4>DD_SYS_FIXED_AREA_BASE</span></a><span class=cF0>00100000 0000 0000000010 DefineStr </span><span class=cF4>
<a name="l1274"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KDefine.CC.html#l108"><span class=cF4>DD_SYS_FIXED_AREA_END</span></a><span class=cF0>00101FFF 0000 0000000010 DefineStr </span><span class=cF4>
@ -1670,9 +1670,9 @@ body {background-color:#000000;}
<a name="l1642"></a></span><a href="https://tomawezome.github.io/ZealOS/System/BlkDev/ZDiskA.CC.html#l192"><span class=cF4>DelTreeDirs </span></a><span class=cF0>0076980B58 0005 0000000064 Funct </span><span class=cF4>
<a name="l1643"></a></span><a href="https://tomawezome.github.io/ZealOS/System/BlkDev/ZDiskA.CC.html#l212"><span class=cF4>DelTreeFiles </span></a><span class=cF0>0076980AC8 0005 0000000066 Funct </span><span class=cF4>
<a name="l1644"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Diff.CC.html#l259"><span class=cF4>Diff </span></a><span class=cF0>00769EC7A8 0004 0000000254 Funct Public </span><span class=cF4>
<a name="l1645"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Diff.CC.html#l242"><span class=cF4>DiffBins </span></a><span class=cF0>00764A0998 0003 000000008E Funct </span><span class=cF4>
<a name="l1645"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Diff.CC.html#l242"><span class=cF4>DiffBins </span></a><span class=cF0>00764992F0 0003 000000008E Funct </span><span class=cF4>
<a name="l1646"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Diff.CC.html#l26"><span class=cF4>DiffEntriesCompare </span></a><span class=cF0>00764CDDC8 0005 0000000021 Funct </span><span class=cF4>
<a name="l1647"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Diff.CC.html#l39"><span class=cF4>DiffSel </span></a><span class=cF0>0076499828 0005 00000003FD Funct </span><span class=cF4>
<a name="l1647"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Diff.CC.html#l39"><span class=cF4>DiffSel </span></a><span class=cF0>0076499628 0005 00000003FD Funct </span><span class=cF4>
<a name="l1648"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Diff.CC.html#l157"><span class=cF4>DiffSub </span></a><span class=cF0>00769E79B8 0007 00000002F4 Funct </span><span class=cF4>
<a name="l1649"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/BlkDev/DiskDirB.CC.html#l120"><span class=cF4>Dir </span></a><span class=cF0>000002E458 0006 00000002E6 Funct Public </span><span class=cF4>
<a name="l1650"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/BlkDev/DiskDirContext.CC.html#l1"><span class=cF4>DirContextDel </span></a><span class=cF0>000002D738 001D 00000000B0 Funct Public </span><span class=cF4>
@ -1686,7 +1686,7 @@ body {background-color:#000000;}
<a name="l1658"></a></span><a href="https://tomawezome.github.io/ZealOS/System/BlkDev/FileMgr.CC.html#l2"><span class=cF4>DirFileDoc </span></a><span class=cF0>0076953E88 0005 0000000108 Funct </span><span class=cF4>
<a name="l1659"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/BlkDev/DiskDirA.CC.html#l152"><span class=cF4>DirFilesFlatten </span></a><span class=cF0>000002868B 0004 ExportSysSym Imm </span><span class=cF4>
<a name="l1660"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/BlkDev/DiskDirA.CC.html#l99"><span class=cF4>DirFilesSort </span></a><span class=cF0>0000028553 0006 ExportSysSym Imm </span><span class=cF4>
<a name="l1661"></a></span><a href="https://tomawezome.github.io/ZealOS/Demo/ToHtmlToTXTDemo/HtmlDirList.CC.html#l1"><span class=cF4>DirIndexList </span></a><span class=cF0>00729524C0 0001 00000001A8 Funct </span><span class=cF4>
<a name="l1661"></a></span><a href="https://tomawezome.github.io/ZealOS/Demo/ToHtmlToTXTDemo/HtmlDirList.CC.html#l1"><span class=cF4>DirIndexList </span></a><span class=cF0>00729544C0 0001 00000001A8 Funct </span><span class=cF4>
<a name="l1662"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/BlkDev/FileSysFAT.CC.html#l213"><span class=cF4>DirLongNameFill </span></a><span class=cF0>000002AFA8 0006 ExportSysSym Imm </span><span class=cF4>
<a name="l1663"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/BlkDev/DiskDirB.CC.html#l184"><span class=cF4>DirMake </span></a><span class=cF0>000002E740 0016 0000000171 Funct Public </span><span class=cF4>
<a name="l1664"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/BlkDev/DiskStrA.CC.html#l118"><span class=cF4>DirNameAbs </span></a><span class=cF0>000002120A 0014 0000000304 Funct Public </span><span class=cF4>
@ -1790,7 +1790,7 @@ body {background-color:#000000;}
<a name="l1762"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/DocUtils.CC.html#l145"><span class=cF4>DocOpt </span></a><span class=cF0>007647C4A8 0001 0000000091 Funct Public </span><span class=cF4>
<a name="l1763"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/DocUtils.CC.html#l77"><span class=cF4>DocOptDoc </span></a><span class=cF0>007647D630 0003 00000000DE Funct </span><span class=cF4>
<a name="l1764"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/DocUtils.CC.html#l53"><span class=cF4>DocOptEntry </span></a><span class=cF0>0076490450 0005 00000000AF Funct </span><span class=cF4>
<a name="l1765"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/DocUtils.CC.html#l107"><span class=cF4>DocOptFile </span></a><span class=cF0>007648EA28 0003 0000000064 Funct </span><span class=cF4>
<a name="l1765"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/DocUtils.CC.html#l107"><span class=cF4>DocOptFile </span></a><span class=cF0>0076491028 0003 0000000064 Funct </span><span class=cF4>
<a name="l1766"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/DocUtils.CC.html#l121"><span class=cF4>DocOptList </span></a><span class=cF0>007647CB20 0005 000000008C Funct
<a name="l1767"></a>DocPrint 0000000000 0001 NULL </span><span class=cF4>
<a name="l1768"></a></span><a href="https://tomawezome.github.io/ZealOS/System/DolDoc/DocPutS.CC.html#l164"><span class=cF4>DocPrint </span></a><span class=cF0>00767630C8 0261 000000004D Funct Public </span><span class=cF4>
@ -1837,7 +1837,7 @@ body {background-color:#000000;}
<a name="l1809"></a></span><a href="https://tomawezome.github.io/ZealOS/System/DolDoc/DocRecalcLib.CC.html#l213"><span class=cF4>DocUpdateTaskDocs </span></a><span class=cF0>00768F0B58 0003 00000000FF Funct </span><span class=cF4>
<a name="l1810"></a></span><a href="https://tomawezome.github.io/ZealOS/System/DolDoc/DocRecalc.CC.html#l186"><span class=cF4>DocWordWrapAdd </span></a><span class=cF0>00768E32B8 0003 00000001BA Funct </span><span class=cF4>
<a name="l1811"></a></span><a href="https://tomawezome.github.io/ZealOS/System/DolDoc/DocRecalc.CC.html#l3"><span class=cF4>DocWordWrapDel </span></a><span class=cF0>00768EFE28 0003 000000019A Funct </span><span class=cF4>
<a name="l1812"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/StrUtils.CC.html#l82"><span class=cF4>DocWordsFile </span></a><span class=cF0>007649D398 0003 00000000C2 Funct
<a name="l1812"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/StrUtils.CC.html#l82"><span class=cF4>DocWordsFile </span></a><span class=cF0>007649FD48 0003 00000000C2 Funct
<a name="l1813"></a>DocWrite 0000000000 0001 NULL </span><span class=cF4>
<a name="l1814"></a></span><a href="https://tomawezome.github.io/ZealOS/System/DolDoc/DocFile.CC.html#l207"><span class=cF4>DocWrite </span></a><span class=cF0>0076791DF0 003C 000000008A Funct Public </span><span class=cF4>
<a name="l1815"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/BlkDev/FileSysFAT.CC.html#l10"><span class=cF4>Dos2CDate </span></a><span class=cF0>000002A763 0003 ExportSysSym Imm </span><span class=cF4>
@ -2279,7 +2279,7 @@ body {background-color:#000000;}
<a name="l2251"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/BlkDev/DiskStrA.CC.html#l38"><span class=cF4>FilesFindMatch </span></a><span class=cF0>0000020F62 0026 00000002A4 Funct Public </span><span class=cF4>
<a name="l2252"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Boot/DiskISORedSea.CC.html#l3"><span class=cF4>FillU16Palindrome </span></a><span class=cF0>00766C4238 0007 0000000022 Funct </span><span class=cF4>
<a name="l2253"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Boot/DiskISORedSea.CC.html#l9"><span class=cF4>FillU32Palindrome </span></a><span class=cF0>00765685D8 0005 000000001F Funct </span><span class=cF4>
<a name="l2254"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Find.CC.html#l166"><span class=cF4>Find </span></a><span class=cF0>007649D268 0049 000000011D Funct Public </span><span class=cF4>
<a name="l2254"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Find.CC.html#l166"><span class=cF4>Find </span></a><span class=cF0>007649FC18 0049 000000011D Funct Public </span><span class=cF4>
<a name="l2255"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Find.CC.html#l28"><span class=cF4>FindFile </span></a><span class=cF0>0076495028 0003 0000000455 Funct </span><span class=cF4>
<a name="l2256"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Find.CC.html#l234"><span class=cF4>FindWiz </span></a><span class=cF0>00764949D8 0003 0000000301 Funct </span><span class=cF4>
<a name="l2257"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KDate.CC.html#l77"><span class=cF4>FirstDayOfMon </span></a><span class=cF0>000001189A 0004 0000000041 Funct Public </span><span class=cF4>
@ -3643,7 +3643,7 @@ body {background-color:#000000;}
<a name="l3615"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Sound.CC.html#l346"><span class=cF4>MusicSettingsReset </span></a><span class=cF0>007697D2F0 0005 00000000A6 Funct </span><span class=cF4>
<a name="l3616"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KMisc.CC.html#l214"><span class=cF4>Mute </span></a><span class=cF0>000001653E 0004 000000004B Funct Public </span><span class=cF4>
<a name="l3617"></a></span><a href="https://tomawezome.github.io/ZealOS/Home/HomeKeyPlugIns.CC.html#l11"><span class=cF4>MyPutKey </span></a><span class=cF0>0076313E28 0003 00000008AE Funct </span><span class=cF4>
<a name="l3618"></a></span><a href="https://tomawezome.github.io/ZealOS/Home/HomeKeyPlugIns.CC.html#l243"><span class=cF4>MyPutS </span></a><span class=cF0>0076343DA8 0003 000000000A Funct
<a name="l3618"></a></span><a href="https://tomawezome.github.io/ZealOS/Home/HomeKeyPlugIns.CC.html#l243"><span class=cF4>MyPutS </span></a><span class=cF0>0076341B58 0003 000000000A Funct
<a name="l3619"></a>NEG 00775F4C70 0000 OpCode
<a name="l3620"></a>NOLIST 0000000057 0000 AsmKeyWord </span><span class=cF4>
<a name="l3621"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.HH.html#l24"><span class=cF4>NONE </span></a><span class=cF0>0 0017 0000000008 DefineStr
@ -4070,7 +4070,7 @@ body {background-color:#000000;}
<a name="l4042"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/StrPrint.CC.html#l1110"><span class=cF4>Print </span></a><span class=cF0>0000014086 0249 0000000038 Funct Public </span><span class=cF4>
<a name="l4043"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/StrPrint.CC.html#l1129"><span class=cF4>PrintErr </span></a><span class=cF0>0000014106 0064 000000009D Funct Public </span><span class=cF4>
<a name="l4044"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/StrPrint.CC.html#l1138"><span class=cF4>PrintWarn </span></a><span class=cF0>00000141A6 001E 00000000A1 Funct Public </span><span class=cF4>
<a name="l4045"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Profiler.CC.html#l30"><span class=cF4>Prof </span></a><span class=cF0>007649D728 0001 00000000F8 Funct Public </span><span class=cF4>
<a name="l4045"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Profiler.CC.html#l30"><span class=cF4>Prof </span></a><span class=cF0>00764A00D8 0001 00000000F8 Funct Public </span><span class=cF4>
<a name="l4046"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Profiler.CC.html#l56"><span class=cF4>ProfCompare </span></a><span class=cF0>007654EA50 0003 000000001A Funct </span><span class=cF4>
<a name="l4047"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Profiler.CC.html#l61"><span class=cF4>ProfRep </span></a><span class=cF0>00764A8078 0001 000000031C Funct Public </span><span class=cF4>
<a name="l4048"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Profiler.CC.html#l11"><span class=cF4>ProfTimerInt </span></a><span class=cF0>00764866D8 0005 000000008B Funct </span><span class=cF4>
@ -4774,8 +4774,8 @@ body {background-color:#000000;}
<a name="l4746"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KDefine.CC.html#l246"><span class=cF4>ST_COLORS </span></a><span class=cF0>BLACK 10 0001 0000000068 DefineStr </span><span class=cF4>
<a name="l4747"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/SysRep.CC.html#l250"><span class=cF4>ST_CPUID_1_ECX_FLAGS</span></a><span class=cF0>SSE3 13B 0000 00000011D8 DefineStr </span><span class=cF4>
<a name="l4748"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/SysRep.CC.html#l215"><span class=cF4>ST_CPUID_1_EDX_FLAGS</span></a><span class=cF0>x87 FPU 20 0000 00000001D0 DefineStr </span><span class=cF4>
<a name="l4749"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KDefine.CC.html#l159"><span class=cF4>ST_DAYS_OF_WEEK </span></a><span class=cF0>Sunday 07 0005 0000000040 DefineStr </span><span class=cF4>
<a name="l4750"></a></span><a href="https://tomawezome.github.io/ZealOS/System/DolDoc/DocInit.CC.html#l14"><span class=cF4>ST_DOC_CMDS </span></a><span class=cF0>TX 2B 01C3 0000000088 DefineStr </span><span class=cF4>
<a name="l4749"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KDefine.CC.html#l159"><span class=cF4>ST_DAYS_OF_WEEK </span></a><span class=cF0>Sunday 07 0004 0000000040 DefineStr </span><span class=cF4>
<a name="l4750"></a></span><a href="https://tomawezome.github.io/ZealOS/System/DolDoc/DocInit.CC.html#l14"><span class=cF4>ST_DOC_CMDS </span></a><span class=cF0>TX 2B 016E 0000000088 DefineStr </span><span class=cF4>
<a name="l4751"></a></span><a href="https://tomawezome.github.io/ZealOS/System/DolDoc/DocInit.CC.html#l20"><span class=cF4>ST_DOC_FLAGS </span></a><span class=cF0>T 3E 0007 00000000C0 DefineStr </span><span class=cF4>
<a name="l4752"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KDefine.CC.html#l228"><span class=cF4>ST_DRIVE_TYPES </span></a><span class=cF0>NULL 06 0002 0000000028 DefineStr </span><span class=cF4>
<a name="l4753"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.HH.html#l4127"><span class=cF4>ST_ERR_ST </span></a><span class=cF0>\&quot;\d\dRED\ 000A 0000000028 DefineStr </span><span class=cF4>
@ -4847,7 +4847,7 @@ body {background-color:#000000;}
<a name="l4819"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.HH.html#l4343"><span class=cF4>SUF_T2S </span></a><span class=cF0>0x100 0003 0000000008 DefineStr </span><span class=cF4>
<a name="l4820"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.HH.html#l4341"><span class=cF4>SUF_TO_LOWER </span></a><span class=cF0>0x040 0003 0000000008 DefineStr </span><span class=cF4>
<a name="l4821"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.HH.html#l4340"><span class=cF4>SUF_TO_UPPER </span></a><span class=cF0>0x020 0010 0000000008 DefineStr </span><span class=cF4>
<a name="l4822"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/StrUtils.CC.html#l183"><span class=cF4>SUFile </span></a><span class=cF0>0076498AA0 0003 000000010D Funct </span><span class=cF4>
<a name="l4822"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/StrUtils.CC.html#l183"><span class=cF4>SUFile </span></a><span class=cF0>007649D6A0 0003 000000010D Funct </span><span class=cF4>
<a name="l4823"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.HH.html#l1886"><span class=cF4>SV_I_REG </span></a><span class=cF0>9 0005 0000000008 DefineStr </span><span class=cF4>
<a name="l4824"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.HH.html#l1888"><span class=cF4>SV_NONE </span></a><span class=cF0>11 0004 0000000008 DefineStr </span><span class=cF4>
<a name="l4825"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.HH.html#l1885"><span class=cF4>SV_R_REG </span></a><span class=cF0>8 0007 0000000008 DefineStr </span><span class=cF4>
@ -5198,7 +5198,7 @@ body {background-color:#000000;}
<a name="l5170"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/Sched.CC.html#l308"><span class=cF4>TaskQueueRemove </span></a><span class=cF0>000000D385 0008 0000000037 Funct Public </span><span class=cF4>
<a name="l5171"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/MemRep.CC.html#l43"><span class=cF4>TaskQueueSize </span></a><span class=cF0>0076493B90 0003 00000000A5 Funct </span><span class=cF4>
<a name="l5172"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KDebug.CC.html#l287"><span class=cF4>TaskRegAddr </span></a><span class=cF0>0000017026 0007 00000000DA Funct </span><span class=cF4>
<a name="l5173"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/TaskRep.CC.html#l19"><span class=cF4>TaskRep </span></a><span class=cF0>0076509538 0001 0000000063 Funct Public </span><span class=cF4>
<a name="l5173"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/TaskRep.CC.html#l19"><span class=cF4>TaskRep </span></a><span class=cF0>00764E1BB0 0001 0000000063 Funct Public </span><span class=cF4>
<a name="l5174"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/TaskRep.CC.html#l2"><span class=cF4>TaskRepTask </span></a><span class=cF0>00766C1988 0005 0000000108 Funct </span><span class=cF4>
<a name="l5175"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/Job.CC.html#l27"><span class=cF4>TaskResetAwaitingMessage</span></a><span class=cF0>000001D953 000A 000000003F Funct Public </span><span class=cF4>
<a name="l5176"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KTask.CC.html#l117"><span class=cF4>TaskStackNew </span></a><span class=cF0>000001CAAB 0004 ExportSysSym Imm </span><span class=cF4>
@ -5279,7 +5279,7 @@ body {background-color:#000000;}
<a name="l5251"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Debug.CC.html#l271"><span class=cF4>UpdateRegVarImg </span></a><span class=cF0>0076B01A28 0003 0000000069 Funct </span><span class=cF4>
<a name="l5252"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KTask.CC.html#l475"><span class=cF4>User </span></a><span class=cF0>000001D523 0019 0000000082 Funct Public </span><span class=cF4>
<a name="l5253"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KTask.CC.html#l465"><span class=cF4>UserCmdLine </span></a><span class=cF0>000001D4CB 0004 0000000054 Funct Public </span><span class=cF4>
<a name="l5254"></a></span><a href="https://tomawezome.github.io/ZealOS/Home/HomeSys.CC.html#l4"><span class=cF4>UserStartUp </span></a><span class=cF0>0076342F00 0004 0000000050 Funct </span><span class=cF4>
<a name="l5254"></a></span><a href="https://tomawezome.github.io/ZealOS/Home/HomeSys.CC.html#l4"><span class=cF4>UserStartUp </span></a><span class=cF0>0076340CB0 0004 0000000050 Funct </span><span class=cF4>
<a name="l5255"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KTask.CC.html#l429"><span class=cF4>UserTaskCont </span></a><span class=cF0>000001D3B3 0006 00000000D6 Funct Public </span><span class=cF4>
<a name="l5256"></a></span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.HH.html#l501"><span class=cF4>VBE_MODES_NUM </span></a><span class=cF0>32 000B 0000000008 DefineStr
<a name="l5257"></a>VERR 00775F05B8 0000 OpCode

View file

@ -134,6 +134,11 @@ U0 PaintLoadImage()
MemCopy(text.fb_alias, paint.fb, text.buffer_size);
}
U32 PaintImagePeek(I64 x, I64 y)
{
return paint.fb[x + y * GR_WIDTH];
}
I0 Paint32()
{
I64 sc, ch, i, j, sc_space = Char2ScanCode(CH_SPACE);
@ -153,7 +158,8 @@ I0 Paint32()
"$$GREEN$$0-9$$FG$$ to get colors from current palette.\n"
"$$GREEN$$R, G, or B$$FG$$ to increase color values.\n"
"$$GREEN$$Shift-R, Shift-G, or Shift-B$$FG$$ to decrease.\n"
"$$GREEN$$+ or -$$FG$$ to change brush size.\n\n"
"$$GREEN$$+ or -$$FG$$ to change brush size.\n"
"$$GREEN$$Alt$$FG$$ to peek (eyedropper) color under brush.\n\n"
"$$BLUE$$Ctrl-S$$FG$$ to save image.\n"
"$$BLUE$$Ctrl-L$$FG$$ to load image.\n\n"
"$$GREEN$$Left-click or SPACE$$FG$$ to draw.\n\n"
@ -204,6 +210,10 @@ I0 Paint32()
case 0:
switch (sc.u8[0])
{
case SC_ALT:
paint.color = PaintImagePeek(mouse.pos.x, mouse.pos.y);
break;
case SC_CURSOR_LEFT:
break;
@ -215,6 +225,7 @@ I0 Paint32()
case SC_CURSOR_DOWN:
break;
}
break;