/programs/media/log_el/docs/about.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/log_el/docs/mn4bit.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/log_el/docs/readme.htm |
---|
0,0 → 1,122 |
<html> |
<head> |
<title>Îãëàâëåíèå</title> |
<meta http-equiv="content-type" content="text/html; charset=WINDOWS-1251"> |
<style> |
body |
{ |
font-size: 15px; |
font-family: "Bookman Old Style"; |
color: black; |
text-align: justify; |
} |
h1 { color: green; font-size: 23px; } |
h2 { color: green; font-size: 21px; } |
h3 { color: green; font-size: 19px; } |
h4 { color: #803f00; font-size: 17px; } |
i { color: #0099cc; } |
b { color: #0099cc; } |
p { |
text-indent: 1em; |
margin-top: 3px; |
margin-bottom: 2px; |
margin-left: 0px; |
margin-right: 0px; |
} |
ol, ul, dl{ |
margin-top: 3px; |
margin-bottom: 2px; |
} |
pre |
{ |
padding: 2px; |
padding-left: 20px; |
margin-top: 5px; |
margin-bottom: 5px; |
margin-left: 0px; |
margin-right: 0px; |
font-family: "Courier New"; |
font-size: 15px; |
color: #004000; |
background-color: #ffd0ff; |
} |
table |
{ |
font-size: 15px; |
} |
</style> |
</head> |
<body> |
<h1>Ëîãè÷åñêèå ýëåìåíòû âåðñèÿ îò 15.03.2012</h1> |
<p>Îãëàâëåíèå</p> |
<ul> |
<li>Î ïðîãðàììå</li> |
<li><a href="#algor">Ðàáîòà ñ ïðîãðàììîé</a></li> |
<ul> |
<li>Îòêðûòèå ôàéëîâ</li> |
<li>Çàïóñê / Îñòàíîâêà / Óïðàâëåíèå</li> |
<li>Ðåäàêòèðîâàíèå</li> |
<li>Ñîõðàíåíèå</li> |
</ul> |
<li><a href="#exampl">Ïðèìåð</a></li> |
<li><a href="#v_obj">Âèäû îáúåêòîâ</a></li> |
<ul> |
<li><a href="#obj_poi">Êëþ÷åâàÿ òî÷êà</a></li> |
<li><a href="#obj_spoi">Ïðîâîä áåç ïåðåñå÷åíèÿ</a></li> |
<li><a href="#obj_lel">Ëîã÷åñêèé ýëåìåíò</a></li> |
<li><a href="#obj_capt">Íàäïèñü</a></li> |
</ul> |
<li>Àâòîð</li> |
</ul> |
<h2>Î ïðîãðàììå</h2> |
<p>Ïðîãðàììà äëÿ ìîäåëèðîâàíèÿ è ïðîñìîòðà <i>ëîãè÷åñêèõ ñõåì</i>. Ëîãè÷åñêèå ñõåìû ñîñòîÿò èç <i>ëîãè÷åñêèõ ýëåìåíòîâ</i>, è ðàñ÷èòàíû íà ðàáîòó ñ äâóìÿ âèäàìè ñèãíàëîâ 0 è 1. |
Íåêîòîðûå èç ôóíêöèé ïðîãðàììû ïîêà åùå íå ñäåëàíû. |
Ëèöåíçèÿ ñâîáîäíàÿ.</p> |
<p><img src="about.png"></p> |
<p>Âíåøíèé âèä ïðîãðàììû.</p> |
<h2><a name="algor">Ðàáîòà ñ ïðîãðàììîé</a></h2> |
<h3>Îòêðûòèå ôàéëîâ</h3> |
<p>Ñõåìû õðàíÿòñÿ â òåêñòîâîì âèäå, îòêðûâàòü èõ ìîæíî ÷åðåç êíîïêó <img src="tb_open.png"> ñ ïîìîùüþ äèàëîãîâîãî îêíà.</p> |
<h3>Çàïóñê / Îñòàíîâêà / Óïðàâëåíèå</h3> |
<p>Ïîñëå îòêðûòèÿ ñõåìû äëÿ ïðîñìîòðà åå ðàáîòû íóæíî íàæàòü êíîïêó çàïóñêà <img src="tb_run.png">. Îñòàíîâêà ìîäåëèðîâàíèÿ äåëàåòñÿ òîé æå ñàìîé êíîïêîé. Ïîñëå çàïóñêà ñõåìà íà÷èíàåò ðàáîòàòü (ìîãóò äâèãàòüñÿ ðàçíûå ñèãíàëû). Äëÿ óïðàâëåíèÿ ðàáîòîé ñõåìû ïðåäóñìîòðåíû îáúåêòû íàäïèñåé. Åñëè íàäïèñü ñîçäàâàëàñü íå êàê èíôîðìàöèîííàÿ òî ïîëüçîâàòåëü ìîæåò âûáðàòü òàêóþ íàäïèñü â ñïèñêå è êíîïêàìè <img src="tb_0.png"> è <img src="tb_1.png"> îïðåäåëÿòü êàêîé èç ñèãíàëîâ ïîäàâàòü (0 èëè 1) íà òî ìåñòî ñõåìû, ãäå íàõîäèòñÿ äàííàÿ íàäïèñü.</p> |
<h3>Ðåäàêòèðîâàíèå</h3> |
<p>Îïèñàíèå êíîïîê äëÿ ðåäàêòèðîâàíèÿ:</p> |
<p><img src="tb_cursor.png"> - ñáðîñ ðåæèìà ðèñîâàíèÿ ïðîâîäîâ</p> |
<p><img src="tb_pen_1.png"> - óñòàíîâêà ðåæèìà ðèñîâàíèÿ ïðîâîäîâ</p> |
<p><img src="tb_pen_2.png"> - óñòàíîâêà ðåæèìà ðèñîâàíèÿ òî÷åê äëÿ ïðîâîäîâ áåç ïåðåñå÷åíèé</p> |
<p><img src="tb_eraser.png"> - óñòàíîâêà ðåæèìà ñòèðàíèÿ ïðîâîäîâ</p> |
<p>Ðåäàêòèðîâàíèå ìíîãèõ îáúåêòîâ åùå íå ñäåëàíî :( ... Ïîêà ìîæíî ðåäàêòèðîâàòü ôàéëû ñî ñõåìàìè òåêñòîâûìè ðåäàêòîðàìè, íî ýòî íå óäîáíî. Ïîòîìó ñîçäàíèå íîâûõ ñõåì ñåé÷àñ ïðîáëåìàòè÷íî.</p> |
<h3>Ñîõðàíåíèå</h3> |
<p>Äëÿ ñîõðàíåíèÿ ñõåìû íàæìèòå íà êíîïêó ñîõðàíåíèÿ <img src="tb_save.png">.</p> |
<h2><a name="exampl">Ïðèìåð</a></h2> |
<p>Ñõåìà äëÿ ïåðåìíîæåíèÿ 4 áèòíûõ ÷èñåë:</p> |
<p><img src="mn4bit.png"></p> |
<p>Íà ðèñóíêå ÷èñëî a (a0+a1 = 1+2 = 3) óìíîæàåòñÿ íà b (b1+b3 = 2+8 = 10) è íà âûõîäå ïîëó÷àåòñÿ c (c1+c2+c3+c4 = 2+4+8+16 = 30).</p> |
<h2><a name="v_obj">Âèäû îáúåêòîâ</a></h2> |
<p>Â ôàéëàõ ñî ñõåìàìè åñòü 4 âèäà îáúåêòîâ.</p> |
<h3><a name="obj_poi">Êëþ÷åâàÿ òî÷êà</a></h3> |
<p>Êëþ÷åâàÿ òî÷êà ýòî ïðîìåæóòî÷íûé îáúåêò, êîòîðûé ñëóæèò äëÿ ñîçäàíèÿ ïðîâîäîâ. Êëþ÷åâàÿ òî÷êà ñîñòîèò èç 2-õ êîîðäèíàò è ïåðåìåííîé íàïðàâëåíèé. Íàïðàâëåíèé ìîæåò áûòü ìàêñèìóì 4 (<i>ââåðõ</i>, <i>âíèç</i>, <i>âëåâî</i>, <i>âïðàâî</i>). Îíè îïðåäåëÿþò â êàêóþ ñòîðîíó îò äàíîé òî÷êè ðèñîâàòü ïðîâîä. Ïðè âñòðå÷å äðóãîé êëþ÷åâîé òî÷êè èëè äîñòèæåíèè êîíöà ñõåìû ðèñîâàíèå ïðîâîäà ïðåêðàùàåòñÿ. Òàêèì îáðàçîì êëþ÷åâûå òî÷êè ýòî âåêòîðíûå îáúåêòû íà îñíîâå êîòîðûõ ðèñóþòñÿ ïðîâîäà, ÷òî ïîçâîëÿåò óìåíüøèòü ðàçìåð ôàéëà ñî ñõåìîé.</p> |
<h3><a name="obj_spoi">Ïðîâîä áåç ïåðåñå÷åíèÿ</a></h3> |
<p>Âñå ïðîâîäà êîòîðûå ïåðåñåêàþòñÿ íà ñõåìå ñ÷èòàþòñÿ ñîåäèíåííûìè ìåæäó ñîáîé. Åñëè âîçíèêàåò íåîáõîäèìîñòü ñîçäàòü ïåðåñåêàþùèåñÿ íî íå ñîåäèíåííûå ïðîâîäà èñïîëüçóåòñÿ îáúåêò ïðîâîäà áåç ïåðåñå÷åíèÿ.</p> |
<h3><a name="obj_lel">Ëîã÷åñêèé ýëåìåíò</a></h3> |
<p>Ëîã÷åñêèå ýëåìåíòû ýòî ñõåìû êîòîðûå èìåþò âõîäû è âûõîäû. Ëîãè÷åñêèé ýëåìåíò àíàëèçèðóåò ñèãíàëû êîòîðûå ïîñòóïàþò åìó íà âõîäû è â çàâèñèìîñòè îò íèõ ôîðìèðóåò ñèãíàëû íà âûõîäàõ. Íà ñõåìå îíè ðèñóþòñÿ ïðÿìîóãîëüíèêàìè ñ âõîäíûìè è âûõîäíûìè íîãàìè. Ëþáóþ ëîãè÷åñêóþ ñõåìó ìîæíî ñîñòàâèòü èç 3-õ îñíîâíûõ ëîãè÷åñêèõ ýëåìåíòîâ: <b>"íå"</b>, <b>"è"</b>, <b>"èëè"</b>. Íèáîëåå ðàñïðîñòðàíåííûå ëîãè÷åñêèå ýëåìåíòû ìîäåëèðóþòñÿ ïðîãðàììîé, ñðåäè íèõ: "íå", "è", "èëè", "èñêëþ÷àþùåå èëè" è "ñóììàòîð". Êàæäûé âèä ëîãè÷åñêîãî ýëåìåíòà â ïðîãðàììå èìååò ñâîé öâåò (õîòÿ ïî ïðàâèëàì ðèñîâàíèÿ ëîãè÷åñêèõ ñõåì âñå ýëåìåíòû ðèñóþòñÿ ÷åðíî áåëûìè).</p> |
<h3><a name="obj_capt">Íàäïèñü</a></h3> |
<p>Íàäïèñè áûâàþò 2-õ âèäîâ: <i>èíôîðìàèîííûå</i> è <i>óïðàâëÿåìûå</i>. Èíôîðìàöèîííûå ñëóæàò äëÿ ïîäïèñåé îïðåäåëåííûõ ÷àñòåé ñõåìû. À ÷åðåç óïðàâëÿåìóþ íàäïèñü ìîæíî ïîäàâàòü íà ñõåìó ñèãíàëû 0 èëè 1.</p> |
<h2>Àâòîð</h2> |
<p>Èãîðü À. (IgorA) - ðàçðàáîòêà ïðîãðàììû.</p> |
</body> |
</html> |
/programs/media/log_el/docs/tb_0.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/log_el/docs/tb_1.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/log_el/docs/tb_cursor.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/log_el/docs/tb_eraser.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/log_el/docs/tb_open.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/log_el/docs/tb_pen_1.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/log_el/docs/tb_pen_2.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/log_el/docs/tb_run.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/log_el/docs/tb_save.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/log_el/docs |
---|
Property changes: |
Added: tsvn:logminsize |
+5 |
\ No newline at end of property |
/programs/media/log_el/trunk/and_2.txt |
---|
0,0 → 1,9 |
size 80 60 |
elements 1 |
24 24 0 and[2] |
captions 3 |
10 8 z x1 |
10 44 z x2 |
56 26 n y1 |
points 4 |
10 25 9 10 27 3 10 44 8 56 26 4 |
/programs/media/log_el/trunk/and_3.txt |
---|
0,0 → 1,10 |
size 80 60 |
elements 1 |
24 24 0 and[3] |
captions 4 |
10 8 z x1 |
10 44 z x2 |
30 44 z x3 |
56 27 n y1 |
points 5 |
10 25 9 10 27 3 10 44 8 56 27 4 22 44 9 |
/programs/media/log_el/trunk/build_ru.bat |
---|
0,0 → 1,9 |
if not exist bin mkdir bin |
if not exist bin\font6x9.bmp @copy ..\..\..\fs\kfar\trunk\font6x9.bmp bin\font6x9.bmp |
@copy *.png bin\*.png |
@copy *.txt bin\*.txt |
@fasm.exe -m 16384 log_el.asm bin\log_el.kex |
@kpack bin\log_el.kex |
if not exist bin\buf2d.obj @fasm.exe -m 16384 ..\..\..\develop\libraries\buf2d\trunk\buf2d.asm bin\buf2d.obj |
@kpack bin\buf2d.obj |
pause |
/programs/media/log_el/trunk/calc.txt |
---|
0,0 → 1,60 |
size 168 108 |
elements 19 |
67 33 0 or[2] |
67 39 0 or[2] |
67 11 0 or[2] |
67 5 0 or[2] |
81 15 0 sm[1] |
81 25 0 sm[1] |
121 44 0 and[3] |
121 52 0 and[3] |
121 60 0 and[3] |
121 68 0 and[3] |
121 76 0 and[3] |
121 92 0 and[3] |
121 84 0 and[3] |
94 19 0 not |
101 29 0 not |
94 29 0 not |
101 19 0 not |
94 15 0 not |
101 15 0 not |
captions 8 |
11 14 z a1 |
27 14 z a2 |
43 14 o a3 |
11 44 z b1 |
27 44 o b2 |
43 44 z b3 |
146 44 n 0 |
146 92 n 6 |
points 105 |
63 36 3 61 40 3 107 45 11 65 6 4 63 42 11 57 6 3 |
65 40 4 65 36 4 65 42 4 61 12 3 65 12 4 65 8 4 |
63 8 3 109 77 11 111 79 11 79 13 6 79 23 8 119 65 4 |
111 87 9 146 55 4 75 41 12 119 77 4 75 7 6 99 27 9 |
75 26 1 77 28 3 119 93 4 117 89 9 63 14 1 119 81 4 |
119 89 4 119 87 4 119 79 4 73 31 9 75 31 6 73 18 1 |
113 95 9 90 26 8 109 93 9 119 95 4 99 13 3 111 27 6 |
115 33 6 90 20 1 43 14 2 43 16 9 63 16 12 27 20 9 |
27 14 2 113 71 11 119 69 4 61 20 12 57 22 12 11 22 9 |
11 14 2 43 44 2 43 46 9 63 46 12 61 50 12 27 50 9 |
27 44 2 11 44 2 11 52 9 57 52 12 99 33 9 57 34 3 |
119 97 4 115 97 9 146 87 4 111 55 11 109 16 4 146 79 4 |
119 49 4 115 49 11 119 47 4 119 57 4 117 57 11 117 30 6 |
119 61 4 146 63 4 146 71 4 119 85 4 119 73 4 146 47 4 |
107 61 11 146 95 4 119 55 4 119 53 4 113 20 6 119 45 4 |
117 73 11 119 71 4 115 81 11 107 69 9 111 47 11 107 53 11 |
90 16 1 115 65 11 90 23 4 109 85 11 90 30 1 119 63 4 |
107 13 2 113 63 11 77 35 4 |
subpoints 74 |
63 40 63 12 75 18 61 16 57 20 57 16 61 46 57 50 |
57 46 75 35 75 13 117 49 113 47 107 20 109 20 107 27 |
109 27 107 30 115 47 109 30 111 30 113 30 117 55 115 55 |
113 55 109 53 111 53 113 53 115 53 113 33 111 33 109 33 |
107 33 117 65 115 63 117 63 109 61 111 61 113 61 115 61 |
115 71 117 71 117 69 115 69 113 69 111 69 109 69 117 53 |
117 81 113 79 115 79 117 79 111 77 113 77 115 77 115 93 |
113 93 115 95 117 61 117 87 117 85 115 85 115 87 113 87 |
113 85 111 85 117 77 117 47 109 45 111 45 113 45 115 45 |
117 45 107 16 |
/programs/media/log_el/trunk/dll.inc |
---|
0,0 → 1,99 |
proc dll.Load, import_table:dword |
mov esi,[import_table] |
.next_lib: mov edx,[esi] |
or edx,edx |
jz .exit |
push esi |
mov esi,[esi+4] |
mov edi,s_libdir.fname |
@@: lodsb |
stosb |
or al,al |
jnz @b |
mcall 68,19,s_libdir |
or eax,eax |
jz .fail |
stdcall dll.Link,eax,edx |
push eax |
mov eax, [eax] |
cmp dword [eax], 'lib_' |
pop eax |
jnz @f |
stdcall dll.Init,[eax+4] |
@@: |
pop esi |
add esi,8 |
jmp .next_lib |
.exit: xor eax,eax |
ret |
.fail: add esp,4 |
xor eax,eax |
inc eax |
ret |
endp |
proc dll.Link, exp:dword,imp:dword |
push eax |
mov esi,[imp] |
test esi,esi |
jz .done |
.next: lodsd |
test eax,eax |
jz .done |
stdcall dll.GetProcAddress,[exp],eax |
or eax,eax |
jz @f |
mov [esi-4],eax |
jmp .next |
@@: mov dword[esp],0 |
.done: pop eax |
ret |
endp |
proc dll.Init, dllentry:dword |
pushad |
mov eax,mem.Alloc |
mov ebx,mem.Free |
mov ecx,mem.ReAlloc |
mov edx,dll.Load |
stdcall [dllentry] |
popad |
ret |
endp |
proc dll.GetProcAddress, exp:dword,sz_name:dword |
mov edx,[exp] |
xor eax,eax |
.next: or edx,edx |
jz .end |
cmp dword[edx],0 |
jz .end |
stdcall strcmp,[edx],[sz_name] |
test eax,eax |
jz .ok |
add edx,8 |
jmp .next |
.ok: mov eax,[edx+4] |
.end: ret |
endp |
proc strcmp, str1:dword,str2:dword |
push esi edi |
mov esi,[str1] |
mov edi,[str2] |
xor eax,eax |
@@: lodsb |
scasb |
jne .fail |
or al,al |
jnz @b |
jmp .ok |
.fail: or eax,-1 |
.ok: pop edi esi |
ret |
endp |
s_libdir: |
db '/sys/lib/' |
.fname rb 32 |
/programs/media/log_el/trunk/le_libs.inc |
---|
/programs/media/log_el/trunk/le_pole.inc |
---|
0,0 → 1,1262 |
; |
; äãªæ¨ ¤«ï ᮧ¤ ¨ï ¨ । ªâ¨à®¢ ¨ï ¯à®¢®¤®¢ |
; |
;-------------------------------------- |
struct Cell |
x dd ? ;+0 |
y dd ? ;+4 |
liv db ? ;+8 |
napr db ? ;+9 |
ends |
offs_cell_x equ 0 |
offs_cell_y equ 4 |
offs_cell_liv equ 8 |
offs_cell_napr equ 9 |
;áâàãªâãà ¤«ï ᮧ¤ ¨ï ¯®«ï |
align 4 |
pole: |
.index dd 0 |
cell dd 0 ;㪠§ â¥«ì ¯ ¬ïâì á® áâàãªâãà ¬¨ ï祥ª |
.max_cell dd 90000 |
.b_sort dd 0 ;£à ¨æ ¤«ï á®àâ¨à®¢ ëå ï祥ª |
pole_index equ dword[edi] |
pole_data equ dword[edi +4] ;㪠§ â¥«ì ¯ ¬ïâì á® áâàãªâãà ¬¨ ï祥ª |
pole_max_cell equ dword[edi +8] |
pole_b_sort equ dword[edi+12] ;£à ¨æ ¤«ï á®àâ¨à®¢ ëå ï祥ª |
macro get_cell_offset reg,ind |
{ |
mov reg,ind |
imul reg,sizeof.Cell |
add reg,dword[cell] |
} |
er_oom db 0 ; á«ãç © ¨áç¥à¯ ¨ï ¯ ¬ï⨠|
Cor_x dd 0 |
Cor_y dd 0 |
zoom db 3 ;¬ áèâ ¡ ¯®«ï |
txt_zoom db ' áèâ ¡:',0 |
txt_osob db '®ç¥ª:',0 |
txt_info: db ' §¬¥à: ' |
.size: rb 16 |
txt_mull db '*',0 |
txt_space db ' ',0 |
txt_nl db 13,10,0 |
txt_buf rb 32 |
align 4 |
proc pole_init uses eax ebx edi, pole:dword |
mov edi,dword[pole] |
;*** ª®¤ á ®¤®© ®¡« áâìî ¢ ¯ ¬ï⨠*** |
mov ebx,4 |
add ebx,sizeof.Cell |
imul ebx,pole_max_cell |
stdcall mem.Alloc,ebx |
mov pole_index,eax |
mov ebx,pole_max_cell |
shl ebx,2 |
add eax,ebx |
mov pole_data,eax |
stdcall pole_clear, edi |
stdcall pole_paint, edi ;à¨á®¢ ¨¥ ¯®«ï ¢ ¡ãä¥à¥ (¥ íªà ¥) |
ret |
endp |
align 4 |
proc pole_delete uses edi, pole:dword |
mov edi,dword[pole] |
stdcall mem.Free,pole_index |
ret |
endp |
;ç¨á⪠¯à®¢®¤®¢ á奬¥ |
align 4 |
proc pole_clear uses eax ecx edi, pole:dword |
mov edi,dword[pole] |
xor eax,eax |
mov pole_b_sort,eax |
mov byte[er_oom],al |
cld |
mov ecx,pole_max_cell |
imul ecx,sizeof.Cell |
mov edi,pole_data |
repne stosb ;memset(cell,0,sizeof(Cell)*pole_max_cell); |
mov edi,dword[pole] |
mov ecx,pole_max_cell |
mov edi,pole_index |
@@: |
stosd ;for(i=0;i<pole_max_cell;i++) pole_index[i]=i; |
;mov dword[edi],eax |
;add edi,4 |
inc eax |
loop @b |
ret |
endp |
align 4 |
proc pole_cell_creat, pole:dword, x:dword, y:dword, li:dword |
pushad |
mov edi,dword[pole] |
mov esi,pole_index |
; *** ¥á«¨ ª«¥âª 㦥 ¡ë« ᮧ¤ |
stdcall pole_cell_find, [pole], [x],[y] |
cmp eax,0 |
je @f |
get_cell_offset ebx,eax |
jmp .change |
@@: |
; *** ᮧ¤ ¨¥ ®¢®© ï祩ª¨ |
; 室¨¬ ®¬¥à ᢮¡®¤®© ï祩ª¨ (i) ¤«ï ¤®¡ ¢«¥¨ï ®¢®© |
;mov esi,pole_index |
inc dword[esi] |
mov ebx,pole_max_cell |
cmp dword[esi],ebx |
jne @f |
dec dword[esi] |
;... need call message: "eror out of memory" ... |
;... ¢ë¢®¤ á®®¡é¥¨ï ¯¥à¥¯®«¥¨ï ¤® ¤®¡ ¢¨âì ... |
mov byte[er_oom],0 |
jmp .fun_e ;return; |
@@: |
mov eax,dword[esi] ;eax - ®¬¥à ¤«ï ¯®á«¥¤¥© ï祩ª¨ |
shl eax,2 |
add eax,pole_index ;eax - 㪠§ â¥«ì ¤®¡ ¢«ï¥¬ãî ï祩ªã (¢ ª®¥æ ¬ áᨢ ) |
get_cell_offset ebx,dword[eax] |
mov ecx,dword[x] |
mov dword[ebx],ecx ;+0 = .x |
mov edx,dword[y] |
mov dword[ebx+4],edx ;+4 = .y |
.change: |
mov ecx,[li] |
mov byte[ebx+offs_cell_liv],cl |
.fun_e: |
popad |
ret |
endp |
;㤠«¥¨¥ ï祩ª¨ |
align 4 |
proc pole_cell_delete, pole:dword, x:dword, y:dword |
pushad |
mov edi,dword[pole] |
mov esi,pole_index |
mov ecx,[esi] |
cmp ecx,1 |
jl .fun_e |
stdcall pole_cell_find, [pole], [x],[y] |
cmp eax,0 |
je .fun_e ;¥á«¨ ª«¥âª ¥ ¡ë« ᮧ¤ |
cmp pole_b_sort,0 |
je @f |
dec pole_b_sort |
@@: |
dec dword[esi] |
mov edi,esi |
add edi,4 |
mov edx,ecx |
cld |
repnz scasd ;¯®¨áª |
sub edi,4 |
shl edx,2 |
add edx,esi ;ª®¥çë© í«¥¬¥â ¬ áᨢ |
sub edx,edi |
shr edx,2 |
mov ecx,edx |
bt ecx,31 |
jc .fun_e |
mov esi,edi |
add esi,4 |
mov edx,[edi] ;á®åà ¥¨¥ ⥪ã饣® 㪠§ ⥫ï |
cld |
rep movsd |
mov [edi],edx ;¢®ááâ ®¢«¥¨¥ ⥪ã饣® 㪠§ ⥫ï (¢ ª®æ¥ ¬ áᨢ ) |
.fun_e: |
popad |
ret |
endp |
if 0 |
align 4 |
proc but_test_pole, pole:dword |
pushad |
stdcall [buf2d_clear], buf_0, [buf_0.color] |
mov edi,dword[pole] |
stdcall pole_paint,edi |
mov ebx,5 |
mov esi,pole_index |
mov ecx,[esi] |
mov edi,open_file_lif |
mov eax,[esi] |
add esi,4 |
stdcall convert_int_to_str |
stdcall [buf2d_draw_text], buf_0, buf_font,edi,5,ebx,color_s0 ;à¨á㥬 ç¨á«® â®ç¥ª |
add ebx,9 |
cmp ecx,1 |
jl .end_dr |
cld |
@@: |
mov eax,[esi] |
add esi,4 |
stdcall convert_int_to_str |
stdcall [buf2d_draw_text], buf_0, buf_font,edi,5,ebx,color_caption ;à¨á㥬 㪠§ ⥫¨ ¬ áᨢë â®ç¥ª |
add ebx,9 |
loop @b |
.end_dr: |
mov ecx,4 |
cld |
@@: |
mov eax,[esi] |
add esi,4 |
stdcall convert_int_to_str |
stdcall [buf2d_draw_text], buf_0, buf_font,edi,5,ebx,color_border ;à¨á㥬 4 áâப¨ 㪠§ ⥫¥© |
add ebx,9 |
loop @b |
stdcall [buf2d_draw], buf_0 |
;call redraw_pole |
popad |
ret |
endp |
end if |
;output: |
; eax - index |
align 4 |
proc pole_cell_find uses edi, pole:dword, x:dword, y:dword |
mov edi,dword[pole] |
mov eax,pole_index |
cmp dword[eax],0 |
jne @f |
xor eax,eax ;if(!fristC) return 0; |
jmp .fun_e |
@@: |
xor eax,eax ;fnd=0; |
cmp pole_b_sort,0 |
je @f |
stdcall pole_bin_find, pole_index, [x],[y], pole_b_sort ;i=BinFind(pole_index, x,y, pole_b_sort); |
cmp eax,0 |
je @f |
shl eax,2 |
add eax,pole_index |
mov eax,dword[eax] ;if(i) fnd=pole_index[i]; |
jmp .fun_e |
@@: |
cmp eax,0 |
jne @f ;¯®¨áª ï祩ª¨ § ¡¨ àë¬ ¤¥à¥¢®¬ |
push ebx ecx edx esi |
;ebx -> i |
;ecx -> firstC |
;edx -> &pole_index[i] |
;esi -> cell[pole_index[i]] |
mov ecx,pole_index |
mov ebx,pole_b_sort |
mov edx,ebx |
shl edx,2 |
add edx,ecx |
inc ebx |
mov ecx,dword[ecx] |
.cycle_b: ;for(i=pole_b_sort+1;i<=fristC;i++) |
add edx,4 |
get_cell_offset esi,dword[edx] |
mov eax,dword[x] |
cmp dword[esi],eax ;+0 = .x |
jne .if_e |
mov eax,dword[y] |
cmp dword[esi+4],eax ;+4 = .y |
jne .if_e |
;if(cell[pole_index[i]].x==x && cell[pole_index[i]].y==y){ |
mov eax,dword[edx] ;fnd=pole_index[i]; |
jmp .cycle_e ;break; |
.if_e: |
inc ebx |
cmp ebx,ecx |
jle .cycle_b |
xor eax,eax ;¢®ááâ ¢«¨¢ ¥¬ ã«¥¢®¥ § 票¥ ¥á«¨ ¥ 諨 ï祩ªã (¢ 横«¥ eax ¯®àâ¨âáï ¯à¨ ¯à®¢¥àª¥ ª®®à¤¨ â) |
.cycle_e: |
pop esi edx ecx ebx |
@@: |
.fun_e: |
ret |
endp |
;output: |
; eax - index |
align 4 |
proc pole_bin_find uses ebx ecx edx edi, mas:dword, fx:dword, fy:dword, k:dword |
xor eax,eax |
mov ebx,1 ;ebx - ¬ ªá¨¬ «ìë© ¯®à冷ª ¤«ï ¤¥à¥¢ |
@@: |
cmp dword[k],ebx |
jle @f ;while(k>por) |
shl ebx,1 ;por<<=1; |
jmp @b |
@@: |
cmp dword[k],ebx |
jge @f ;if(k<por) |
shr ebx,1 ;por>>=1; |
@@: |
mov ecx,ebx ;i=por; |
;ecx -> i |
;edi -> mas[i] |
.cycle_b: ;do{ |
shr ebx,1 ;por>>=1; |
mov edi,ecx |
shl edi,2 |
add edi,dword[mas] |
;if(compare_cells_mb(mas[i],fx,fy)){ |
stdcall pole_compare_cells_mb_coords, dword[edi],[fx],[fy] |
cmp dl,0 |
je .if_u0_e |
@@: ;while(i+por>k) |
mov edx,ecx |
add edx,ebx |
cmp edx,dword[k] ;i+por>k |
jle @f |
shr ebx,1 ;por>>=1; |
jmp @b |
@@: |
add ecx,ebx ;i+=por; |
jmp .if_e |
.if_u0_e: |
;else if(compare_cells_bm(mas[i],fx,fy))i-=por; |
stdcall pole_compare_cells_bm_coords, dword[edi],[fx],[fy] |
cmp dl,0 |
je .if_u1_e |
sub ecx,ebx |
jmp .if_e |
.if_u1_e: |
;else { m=i; por=0; } |
mov eax,ecx |
xor ebx,ebx |
.if_e: |
cmp ebx,0 |
jne .cycle_b ;}while(por); |
ret |
endp |
;output: |
; dl |
align 4 |
proc pole_compare_cells_bm_coords uses eax ebx ecx, i0:dword, fx:dword, fy:dword |
get_cell_offset eax,[i0] |
;eax -> cell[i0] |
mov ebx,dword[fx] |
cmp dword[eax],ebx |
jle @f |
mov dl,1 |
jmp .fun_e |
@@: |
mov ecx,dword[fy] |
cmp dword[eax+4],ecx |
jle @f |
cmp dword[eax],ebx |
jne @f |
mov dl,1 |
jmp .fun_e |
@@: |
xor dl,dl |
.fun_e: |
ret |
endp |
;output: |
; dl |
align 4 |
proc pole_compare_cells_mb_coords uses eax ebx ecx, i0:dword, fx:dword, fy:dword |
get_cell_offset eax,[i0] |
;eax -> cell[i0] |
mov ebx,dword[fx] |
cmp dword[eax],ebx |
jge @f |
mov dl,1 |
jmp .fun_e |
@@: |
mov ecx,dword[fy] |
cmp dword[eax+4],ecx |
jge @f |
cmp dword[eax],ebx |
jne @f |
mov dl,1 |
jmp .fun_e |
@@: |
xor dl,dl |
.fun_e: |
ret |
endp |
;output: |
; dl |
align 4 |
proc pole_compare_cells_bm, i0:dword, i1:dword |
push eax ebx ecx |
get_cell_offset eax,[i0] ;eax -> cell[i0] |
get_cell_offset ebx,[i1] ;ebx -> cell[i1] |
mov ecx,dword[ebx] ;+0 = .x |
cmp dword[eax],ecx |
jle @f ;x0>x1 |
mov dl,1 |
jmp .fun_e |
@@: |
jne @f ;x0==x1 |
mov ecx,dword[ebx+4] ;+4 = .y |
cmp dword[eax+4],ecx |
jle @f ;y0>y1 |
mov dl,1 |
jmp .fun_e |
@@: |
xor dl,dl |
.fun_e: |
pop ecx ebx eax |
ret |
endp |
;description: |
; ç¨á⪠ï祥ª (¯à®¢®¤®¢), ãáâ ®¢ª ¢á¥å ¯à®¢®¤ å 0-£® ᨣ « |
; 㦮 ¢ë§ë¢ âì ¯à¨ ä®à¬¨à®¢ ¨¨ ¨«¨ ¯¥à¥¤ § ¯ã᪮¬ á奬ë |
align 4 |
proc pole_reset_cells uses eax ebx ecx edi, pole:dword |
mov edi,dword[pole] |
mov eax,pole_index |
cmp dword[eax],0 |
je .fun_e ;¥á«¨ ¥â ï祥ª (¯à®¢®¤®¢) â® ¢ë室 |
mov ecx,dword[eax] |
cld |
@@: ;横« ¯® ¢á¥¬ ï祩ª ¬ |
add eax,4 |
mov ebx,[eax] |
imul ebx,sizeof.Cell |
add ebx,pole_data |
;and byte[ebx+offs_cell_liv],0xfe ;á¡à®á ¬« ¤è¥£® ¡¨â |
cmp byte[ebx+offs_cell_liv],2 |
je .no_clear |
mov byte[ebx+offs_cell_liv],0 |
.no_clear: |
loop @b |
.fun_e: |
ret |
endp |
align 4 |
proc p_paint_elems uses eax esi |
stdcall dword[tl_node_poi_get_info],0,tree1 |
pop esi |
@@: |
cmp esi,0 |
je @f |
cmp word[esi],el_icon_elems ;¯®«ã票¥ ç¥à¥§ esi ⨯ ¨ª®ª¨ |
jne .end_element |
stdcall [tl_node_poi_get_data], esi, tree1 |
pop eax |
stdcall el_draw, eax |
.end_element: |
cmp word[esi],el_icon_captions ;¯®«ã票¥ ç¥à¥§ esi ⨯ ¨ª®ª¨ |
jne .end_caption |
stdcall [tl_node_poi_get_data], esi, tree1 |
pop eax |
stdcall capt_draw, eax |
.end_caption: |
stdcall dword[tl_node_poi_get_next_info],esi,tree1 |
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
jmp @b |
@@: |
ret |
endp |
;description: |
; äãªæ¨ï à¨á®¢ ¨ï í«¥¬¥â ¯®«¥ |
align 4 |
proc el_draw, h_elem:dword |
pushad |
;el_offs_nam |
mov edi,[h_elem] |
mov eax,[edi] ;coord x |
mov ebx,[edi+4] ;coord y |
movzx edi,byte[edi+sp_offs_el_type] |
imul edi,size_el_opt |
add edi,el_opt_beg ;edi - 㪠§ ⥫ì áâàãªâãàã ᮠ᢮©á⢠¬¨ í«¥¬¥â |
movzx ecx,byte[edi+el_offs_box_x] |
movzx edx,byte[edi+el_offs_box_y] |
dec ecx |
dec edx |
push eax ebx |
mov esi,[h_elem] |
movzx esi,byte[esi+8] |
push dword[edi+el_offs_col] |
push ebx |
push eax |
stdcall move_rotate_n90, ecx,edx,esi |
stdcall draw_scaled_rect, eax,ebx ;à¨á®¢ ¨ ª®à¯ãá í«¥¬¥â |
pop ebx eax |
;*** «£®à¨â¬ à¨á®¢ ¨ï ®£ *** |
movzx esi,byte[zoom] |
cmp esi,1 |
jne .end_m1 |
;*** à¨á®¢ ¨¥ ®£ ¯à¨ 1-¬ ¬ áèâ ¡¥ *** |
;¢å®¤ë¥ ®£¨ |
mov esi,[h_elem] |
stdcall el_get_leg_coords,esi,0 ;ãáâ ®¢ª ¯ à ¬¥â஢ 0-© ®£¨ |
add eax,[Cor_x] |
add ebx,[Cor_y] |
movzx esi,byte[esi+8] |
stdcall move_rotate_n90, 1,0,esi |
mov edx,el_offs_legs_inp |
inc edx |
@@: |
stdcall [buf2d_set_pixel], buf_0, eax,ebx,dword[edi+el_offs_col] |
movzx ecx,byte[edi+edx] |
cmp ecx,0 |
je @f |
stdcall move_rotate_n90, 0,ecx,esi |
inc edx |
jmp @b |
@@: |
;¢ëå®¤ë¥ ®£¨ |
mov esi,[h_elem] |
stdcall el_get_leg_coords,esi,(1 shl 16) ;ãáâ ®¢ª ¯ à ¬¥â஢ 0-© ®£¨ |
add eax,[Cor_x] ;¤«ï à ¡®âë á buf2d_line |
add ebx,[Cor_y] ;¤«ï à ¡®âë á buf2d_line |
movzx esi,byte[esi+8] |
stdcall move_rotate_n90, -2,0,esi |
mov edx,el_offs_legs_out |
inc edx |
@@: |
push dword[edi+el_offs_col] |
stdcall move_rotate_n90, 1,0,esi |
push ebx |
push eax |
stdcall move_rotate_n90, -1,0,esi |
;stdcall draw_scaled_rect, eax,ebx |
stdcall [buf2d_line], buf_0, eax,ebx |
movzx ecx,byte[edi+edx] |
cmp ecx,0 |
je @f |
stdcall move_rotate_n90, 0,ecx,esi |
inc edx |
jmp @b |
@@: |
jmp .end_mn |
.end_m1: |
;*** à¨á®¢ ¨¥ ®£ ¯à¨ n-¬ ¬ áèâ ¡¥ *** |
;¢å®¤ë¥ ®£¨ |
xor edx,edx |
@@: |
stdcall el_get_leg_coords,[h_elem],edx |
mov ecx,eax |
or ecx,ebx |
jz @f |
mov ecx,[h_elem] |
movzx ecx,byte[ecx+8] |
stdcall move_rotate_n90, 1,0,ecx |
add eax,[Cor_x] |
add ebx,[Cor_y] |
imul eax,esi |
imul ebx,esi |
stdcall [buf2d_filled_rect_by_size], buf_0, eax,ebx,esi,esi, dword[edi+el_offs_col] |
inc edx |
jmp @b |
@@: |
;¢ëå®¤ë¥ ®£¨ |
mov edx,(1 shl 16) |
@@: |
stdcall el_get_leg_coords,[h_elem],edx |
mov ecx,eax |
or ecx,ebx |
jz @f |
mov ecx,[h_elem] |
movzx ecx,byte[ecx+8] |
push dword[edi+el_offs_col] |
stdcall move_rotate_n90, -2,0,ecx |
push ebx |
push eax |
stdcall move_rotate_n90, 1,0,ecx |
stdcall draw_scaled_rect, eax,ebx |
inc edx |
jmp @b |
@@: |
.end_mn: |
popad |
ret |
endp |
align 4 |
proc capt_draw uses eax ebx edi esi, h_capt:dword |
mov edi,[h_capt] |
mov eax,[edi] ;coord x |
mov ebx,[edi+4] ;coord y |
add eax,[Cor_x] |
add ebx,[Cor_y] |
movzx esi,byte[zoom] |
cmp esi,1 |
jle @f |
imul eax,esi |
imul ebx,esi |
@@: |
add edi,capt_offs ;edi - 㪠§ â¥«ì ¯®«ãî ¯®¤¯¨áì (á ª®®à¤¨ â ¬¨) |
call str_next_val |
call str_next_val |
;call str_next_val |
stdcall [buf2d_draw_text], buf_0, buf_font,edi,eax,ebx,color_caption ;à¨á㥬 áâபã á ⥪á⮬ |
ret |
endp |
;description: |
; ¯®¤äãªæ¨ï ¤«ï à¨á®¢ ¨ï 㢥«¨ç¥ëå ¯àאַ㣮«ì¨ª®¢ á奬¥ |
align 4 |
proc draw_scaled_rect uses eax ebx ecx edx edi, x0:dword,y0:dword,x1:dword,y1:dword, color:dword |
movzx edi,byte[zoom] |
mov edx,[y1] |
mov ecx,[x1] |
mov ebx,[y0] |
mov eax,[x0] |
cmp eax,ecx |
jle @f |
xchg eax,ecx |
@@: |
sub ecx,eax |
cmp ebx,edx |
jle @f |
xchg ebx,edx |
@@: |
sub edx,ebx |
inc ecx |
inc edx |
imul edx,edi |
imul ecx,edi |
add ebx,[Cor_y] |
imul ebx,edi |
add eax,[Cor_x] |
imul eax,edi |
stdcall [buf2d_filled_rect_by_size], buf_0, eax,ebx,ecx,edx, dword[color] |
ret |
endp |
align 4 |
proc pole_paint, pole:dword |
pushad |
;*** நᮢ ¨¥ à ¬ª¨ |
mov eax,[Cor_x] |
mov ebx,[Cor_y] |
mov ecx,[shem_w] |
mov edx,[shem_h] |
movzx esi,byte[zoom] |
cmp esi,1 |
jle @f |
imul eax,esi |
imul ebx,esi |
imul ecx,esi |
imul edx,esi |
@@: |
dec eax |
dec ebx |
add ecx,2 |
add edx,2 |
stdcall [buf2d_rect_by_size], buf_0, eax,ebx, ecx,edx, color_border |
;eax -> firstC |
;ebx -> i |
;ecx -> cell[pole_index[i]] |
;edx -> color |
mov edi,dword[pole] |
mov eax,pole_index |
cmp dword[eax],0 |
je .no_draw |
mov eax,dword[eax] |
mov ebx,1 |
;--- |
@@: ;while(i<pole_b_sort && Cor_x+cell[pole_index[i]].x<0) |
cmp ebx,pole_b_sort |
jge @f ;¯¥à¥å®¤¨¬ ç «® ¨¦¥£® 横« |
mov ecx,ebx |
shl ecx,2 |
add ecx,pole_index |
get_cell_offset ecx,dword[ecx] |
mov edx,dword[ecx] ;+0 = .x |
add edx,dword[Cor_x] |
cmp edx,0 |
jge @f ;¯¥à¥å®¤¨¬ ç «® ¨¦¥£® 横« |
inc ebx ;i++; // ¤«ï ¯à®¯ã᪠ï祥ª § ®ª®¬ á«¥¢ |
jmp @b |
@@: |
;eax -> pole_index[firstC] |
;ebx -> pole_index[i] |
;edi -> coord_x |
;esi -> coord_y |
shl eax,2 |
shl ebx,2 |
add eax,pole_index |
add ebx,pole_index |
cmp byte[zoom],2 |
jge .zoom2 |
@@: ;for(;i<=fristC;i++){ |
get_cell_offset ecx,dword[ebx] |
;... |
mov edi,dword[Cor_x] |
add edi,dword[ecx] ;+0 = .x |
mov esi,dword[Cor_y] |
add esi,dword[ecx+4] ;+4 = .y |
movzx edx,byte[ecx+offs_cell_liv] |
and edx,3 ;®£à ¨ç¥¨¥ |
shl edx,2 |
add edx,shem_colors |
stdcall [buf2d_set_pixel], buf_0, edi, esi, [edx] |
;... |
add ebx,4 |
cmp ebx,eax |
jle @b |
jmp .no_draw |
.zoom2: |
@@: ;for(;i<=fristC;i++){ |
get_cell_offset ecx,dword[ebx] |
movzx edx,byte[zoom] ;edx ¨á¯®«ì§ã¥âáï ¤«ï ¢¥á¥¨ï zoom ¢ 4 ¡ ©â®¥ ç¨á«® |
mov edi,dword[ecx] ;+0 = .x |
add edi,dword[Cor_x] |
imul edi,edx |
mov esi,dword[ecx+4] ;+4 = .y |
add esi,dword[Cor_y] |
imul esi,edx |
movzx edx,byte[ecx+offs_cell_liv] |
and edx,3 ;®£à ¨ç¥¨¥ |
shl edx,2 |
add edx,shem_colors |
movzx ecx,byte[zoom] |
;;;dec ecx |
stdcall [buf2d_filled_rect_by_size], buf_0, edi, esi, ecx, ecx, [edx] |
add ebx,4 |
cmp ebx,eax |
jle @b |
.no_draw: |
popad |
call p_paint_elems |
ret |
endp |
;®àâ¨à®¢ª ï祥ª ¯®«ï, 㦠¤«ï ¡®«¥¥ ¡ëáâண® ¯®¨áª |
align 4 |
proc pole_sort uses eax edi, pole:dword |
mov edi,dword[pole] |
mov eax,pole_index |
mov eax,dword[eax] ;firstC -> eax |
stdcall pole_fl_sort, pole_index,eax ;á®àâ¨à㥬 ¢á¥ ï祩ª¨ |
mov pole_b_sort,eax ;áâ ¢¨¬ ç¨á«® ®âá®àâ¨à®¢ ëå ï祥ª à ¢®¥ ç¨á«ã ¢á¥å áãé¥áâ¢ãîé¨å ï祥ª |
ret |
endp |
;®àâ¨à®¢ª ¢¥ªâ®à a[1..n] ¬¥â®¤®¬ «®©¤ |
;«¥¬¥â a[0] ¢ á®àâ¨à®¢ª¥ ¥ ãç áâ¢ã¥â |
align 4 |
proc pole_fl_sort uses eax ecx edx edi esi, a:dword, n:dword |
mov ecx,dword[a] |
;®à¬¨à®¢ âì ¨á室®¥ ç áâ¨ç® 㯮à冷祮¥ ¤¥à¥¢® |
mov eax,dword[n] |
shr eax,1 |
@@: ;for(i=n>>1; i>=2; i--) |
stdcall pole_fl_surface, ecx,eax,[n] ;(a,i,n) |
dec eax |
cmp eax,2 |
jge @b |
;믮«¨âì ¯à®æ¥¤ãà㠢ᯫëâ¨ï «®©¤ ¤«ï ª ¦¤®£® ¯®¤¤¥à¥¢ |
mov eax,dword[n] |
@@: ;for(i=n; i>=2; i--){ |
stdcall pole_fl_surface, ecx,1,eax ;(a,1,i) |
;®¬¥áâ¨âì ©¤¥ë© ¬ ªá¨¬ «ìë© í«¥¬¥â ¢ ª®¥æ ᯨ᪠|
mov edi,eax |
shl edi,2 |
add edi,ecx ;edi -> &a[i] |
mov esi,dword[edi] ;w=a[i]; |
mov edx,dword[ecx+4] |
mov dword[edi],edx ;a[i]=a[1]; |
mov dword[ecx+4],esi ;a[1]=w; |
dec eax |
cmp eax,2 |
jge @b |
ret |
endp |
;à®æ¥¤ãà ¢á¯«ëâ¨ï «®©¤ ¯® ¤¥à¥¢ã a[1..k] |
align 4 |
proc pole_fl_surface, a:dword, i:dword, k:dword |
locals |
copy dd ? |
endl |
pushad |
;edx -> ... |
;edi -> m |
;esi -> j |
mov eax,dword[a] |
mov ebx,dword[i] |
mov ecx,dword[k] |
mov edx,ebx |
shl edx,2 |
add edx,eax |
mov edx,dword[edx] |
mov dword[copy],edx ;copy=a[i]; |
mov edi,ebx |
shl edi,1 ;m=i<<1; |
.cycle_b: ;while (m<=k) { |
cmp edi,ecx |
jg .cycle_e |
jne @f ;if (m==k) j=m; |
mov esi,edi |
jmp .else_e |
@@: ;else if (pole_compare_cells_bm(a[m],a[m+1])) j=m; |
mov edx,edi |
shl edx,2 |
add edx,eax |
stdcall pole_compare_cells_bm, dword[edx],dword[edx+4] |
cmp dl,0 |
je @f |
mov esi,edi |
jmp .else_e |
@@: ;else j=m+1; |
mov esi,edi |
inc esi |
.else_e: |
;if (pole_compare_cells_bm(a[j],copy)) { |
mov edx,esi |
shl edx,2 |
add edx,eax |
stdcall pole_compare_cells_bm, dword[edx],dword[copy] |
cmp dl,0 |
je .cycle_e ;} else break; //¢ë室 ¨§ 横« |
mov edx,esi |
shl edx,2 |
add edx,eax |
push dword[edx] ;push a[j]; |
mov edx,ebx |
shl edx,2 |
add edx,eax |
pop dword[edx] ;a[i]=a[j]; |
mov ebx,esi ;i=j; |
mov edi,ebx |
shl edi,1 ;m=i<<1; |
jmp .cycle_b |
.cycle_e: |
;§ ç¥¨ï ¬®£¨å ॣ¨áâ஢ 㦥 ¥ ¢ ¦ë â. ª. ª®¥æ äãªæ¨¨ |
shl ebx,2 |
add eax,ebx |
mov edx,dword[copy] |
mov dword[eax],edx ;a[i]=copy; |
popad |
ret |
endp |
;-------------------------------------- |
align 4 |
proc pole_draw_pok uses eax ebx ecx edx edi esi, pole:dword |
;mov edi,dword[pole] |
mov eax,4 ;à¨á®¢ ¨¥ ⥪áâ |
mov ebx,325*65536+5 |
mov ecx,[sc.work_text] |
or ecx,0x80000000 ;or (1 shl 30) |
mov edx,txt_zoom |
;mov edi,[sc.work] |
int 0x40 |
add bx,9 |
mov edx,txt_osob |
int 0x40 |
add bx,9 |
mov edx,txt_info |
int 0x40 |
mov eax,47 |
movzx ecx,byte[zoom] |
mov ebx,(2 shl 16) |
mov edx,(325+6*9)*65536+5 |
mov esi,[sc.work_button_text] |
or esi,(1 shl 30) |
mov edi,[sc.work_button] |
int 0x40 ;¬ áèâ ¡ |
mov edi,dword[pole] |
mov ecx,pole_index |
mov ecx,[ecx] |
mov edi,[sc.work_button] |
mov ebx,(5 shl 16) |
add edx,(6*0)*65536+9 |
int 0x40 ;ç¨á«® â®ç¥ª |
ret |
endp |
align 4 |
but_zoom_p: |
cmp byte[zoom],16 |
jge @f |
pushad |
;¢ëç¨á«¥¨¥ ᤢ¨£®¢ ¤«ï ¯®«ï, ª®â®àë¥ ®¡¥á¯¥ç â æ¥â஢ªã ¯®«ï ¯à¨ 㢥«¨ç¥¨¨ ¬ áèâ ¡ |
movzx ecx,byte[zoom] |
xor edx,edx |
mov eax,dword[buf_0.w] |
shr eax,1 ;¢ eax ¯®«®¢¨ è¨à¨ë ¯®«ï |
mov ebx,eax ;¤¥« ¥¬ १¥à¢ãî ª®¯¨î eax |
div ecx ;¤¥«¨¬ eax ⥪ã騩 ¬ áèâ ¡ |
xchg eax,ebx |
xor edx,edx |
inc ecx |
div ecx ;¤¥«¨¬ eax ®¢ë© ¬ áèâ ¡ |
sub ebx,eax ;¢ëç¨á«ï¥âáï ᤢ¨£ ¯®«ï ª®â®àë© ®¡¥á¯¥ç¨â æ¥â஢ªã ¯®«ï |
sub dword[Cor_x],ebx ;ᤢ¨£ ¥¬ ¯®«¥ §à¥¨ï ¯® ®á¨ x |
xor ecx,ecx |
mov cl,byte[zoom] |
xor edx,edx |
mov eax,dword[buf_0.h] |
shr eax,1 |
mov ebx,eax |
div ecx |
xchg eax,ebx |
xor edx,edx |
inc ecx |
div ecx |
sub ebx,eax |
sub dword[Cor_y],ebx ;ᤢ¨£ ¥¬ ¯®«¥ §à¥¨ï ¯® ®á¨ y |
inc byte[zoom] |
stdcall pole_draw_pok, pole |
popad |
.buf_clear: |
call redraw_pole |
@@: |
ret |
align 4 |
but_zoom_m: |
cmp byte[zoom],1 |
jle @f |
pushad |
;¢ëç¨á«¥¨¥ ᤢ¨£®¢ ¤«ï ¯®«ï, ª®â®àë¥ ®¡¥á¯¥ç â æ¥â஢ªã ¯®«ï ¯à¨ 㬥ì襨¨ ¬ áèâ ¡ |
movzx ecx,byte[zoom] |
xor edx,edx |
mov eax,dword[buf_0.w] |
shr eax,1 ;¢ eax ¯®«®¢¨ è¨à¨ë ¯®«ï |
mov ebx,eax ;¤¥« ¥¬ १¥à¢ãî ª®¯¨î eax |
div ecx ;¤¥«¨¬ eax ⥪ã騩 ¬ áèâ ¡ |
xchg eax,ebx |
xor edx,edx |
dec ecx |
div ecx ;¤¥«¨¬ eax ®¢ë© ¬ áèâ ¡ |
sub ebx,eax ;¢ëç¨á«ï¥âáï ᤢ¨£ ¯®«ï ª®â®àë© ®¡¥á¯¥ç¨â æ¥â஢ªã ¯®«ï |
sub dword[Cor_x],ebx ;ᤢ¨£ ¥¬ ¯®«¥ §à¥¨ï ¯® ®á¨ x |
xor ecx,ecx |
mov cl,byte[zoom] |
xor edx,edx |
mov eax,dword[buf_0.h] |
shr eax,1 |
mov ebx,eax |
div ecx |
xchg eax,ebx |
xor edx,edx |
dec ecx |
div ecx |
sub ebx,eax |
sub dword[Cor_y],ebx ;ᤢ¨£ ¥¬ ¯®«¥ §à¥¨ï ¯® ®á¨ y |
dec byte[zoom] |
stdcall pole_draw_pok, pole |
popad |
.buf_clear: |
call redraw_pole |
@@: |
ret |
;æ¥â஢ª áå¥¬ë ¯® æ¥âàã íªà |
align 4 |
proc but_center uses eax ebx ecx edx |
movzx ecx,byte[zoom] |
cmp ecx,1 |
jle .end_m_1 |
mov eax,[buf_0.w] |
mov ebx,[shem_w] |
imul ebx,ecx |
sub eax,ebx |
xor edx,edx |
shl ecx,1 |
cmp eax,0 |
jge @f |
neg eax |
inc eax |
div ecx |
neg eax |
inc eax |
jmp .set_x |
@@: |
div ecx |
.set_x: |
mov [Cor_x],eax |
mov eax,[buf_0.h] |
mov ebx,[shem_h] |
shr ecx,1 |
imul ebx,ecx |
sub eax,ebx |
xor edx,edx |
shl ecx,1 |
cmp eax,0 |
jge @f |
neg eax |
inc eax |
div ecx |
neg eax |
inc eax |
jmp .set_y |
@@: |
div ecx |
.set_y: |
mov [Cor_y],eax |
jmp .end_m_n |
.end_m_1: |
mov eax,[buf_0.w] |
sub eax,[shem_w] |
shr eax,1 |
bt eax,30 |
jnc @f |
bts eax,31 |
@@: |
mov [Cor_x],eax |
mov eax,[buf_0.h] |
sub eax,[shem_h] |
shr eax,1 |
bt eax,30 |
jnc @f |
bts eax,31 |
@@: |
mov [Cor_y],eax |
.end_m_n: |
call redraw_pole |
ret |
endp |
align 4 |
but_pole_up: |
push eax ecx edx |
mov eax,dword[buf_0.h] |
shr eax,2 |
movzx ecx,byte[zoom] |
cmp cx,2 |
jl @f ;¤¥«¥¨¥ ¢¥«¨ç¨ã zoom |
xor edx,edx |
div ecx |
@@: |
add dword[Cor_y],eax |
pop edx ecx eax |
call redraw_pole |
ret |
align 4 |
but_pole_dn: |
push eax ecx edx |
mov eax,dword[buf_0.h] |
shr eax,2 |
xor ecx,ecx |
mov cl,byte[zoom] |
cmp cx,2 |
jl @f ;¤¥«¥¨¥ ¢¥«¨ç¨ã zoom |
xor edx,edx |
div ecx |
@@: |
sub dword[Cor_y],eax |
pop edx ecx eax |
call redraw_pole |
ret |
align 4 |
but_pole_left: |
push eax ecx edx |
mov eax,dword[buf_0.w] |
shr eax,2 |
xor ecx,ecx |
mov cl,byte[zoom] |
cmp cx,2 |
jl @f ;¤¥«¥¨¥ ¢¥«¨ç¨ã zoom |
xor edx,edx |
div ecx |
@@: |
add dword[Cor_x],eax |
pop edx ecx eax |
call redraw_pole |
ret |
align 4 |
but_pole_right: |
push eax ecx edx |
mov eax,dword[buf_0.w] |
shr eax,2 |
xor ecx,ecx |
mov cl,byte[zoom] |
cmp cx,2 |
jl @f ;¤¥«¥¨¥ ¢¥«¨ç¨ã zoom |
xor edx,edx |
div ecx |
@@: |
sub dword[Cor_x],eax |
pop edx ecx eax |
call redraw_pole |
ret |
;output: |
; edx - count created points |
align 4 |
proc shem_create_line uses eax ebx ecx edi, x:dword, y:dword, opt:dword |
mov edi,pole |
xor edx,edx |
mov ebx,[x] |
mov ecx,[y] |
bt dword[opt],0 |
jnc @f |
.line_lr: |
inc ebx |
cmp ebx,[shem_w] |
jge @f |
stdcall pole_cell_find, pole,ebx,ecx |
cmp eax,0 |
je .u0 |
imul eax,sizeof.Cell |
add eax,pole_data |
cmp byte[eax+offs_cell_liv],1 |
jne @f |
.u0: |
stdcall pole_cell_creat, pole,ebx,ecx,1 |
inc edx |
jmp .line_lr |
@@: |
mov ebx,[x] |
;mov ecx,[y] |
bt dword[opt],2 |
jnc @f |
.line_rl: |
dec ebx |
cmp ebx,0 |
jl @f |
stdcall pole_cell_find, pole,ebx,ecx |
cmp eax,0 |
je .u1 |
imul eax,sizeof.Cell |
add eax,pole_data |
cmp byte[eax+offs_cell_liv],1 |
jne @f |
.u1: |
stdcall pole_cell_creat, pole,ebx,ecx,1 |
inc edx |
jmp .line_rl |
@@: |
mov ebx,[x] |
mov ecx,[y] |
bt dword[opt],3 |
jnc @f |
.line_du: |
dec ecx |
cmp ecx,0 |
jl @f |
stdcall pole_cell_find, pole,ebx,ecx |
cmp eax,0 |
je .u2 |
imul eax,sizeof.Cell |
add eax,pole_data |
cmp byte[eax+offs_cell_liv],1 |
jne @f |
.u2: |
stdcall pole_cell_creat, pole,ebx,ecx,1 |
inc edx |
jmp .line_du |
@@: |
;mov ebx,[x] |
mov ecx,[y] |
bt dword[opt],1 |
jnc @f |
.line_ud: |
inc ecx |
cmp ecx,[shem_h] |
jge @f |
stdcall pole_cell_find, pole,ebx,ecx |
cmp eax,0 |
je .u3 |
imul eax,sizeof.Cell |
add eax,pole_data |
cmp byte[eax+offs_cell_liv],1 |
jne @f |
.u3: |
stdcall pole_cell_creat, pole,ebx,ecx,1 |
inc edx |
jmp .line_ud |
@@: |
ret |
endp |
align 4 |
redraw_pole: |
stdcall [buf2d_clear], buf_0, [buf_0.color] |
stdcall pole_paint, pole |
stdcall [buf2d_draw], buf_0 |
ret |
/programs/media/log_el/trunk/le_signal.inc |
---|
/programs/media/log_el/trunk/log_el.asm |
---|
0,0 → 1,2140 |
use32 |
org 0x0 |
db 'MENUET01' ;¨¤¥â¨ä. ¨á¯®«ï¥¬®£® ä ©« ¢á¥£¤ 8 ¡ ©â |
dd 0x1 |
dd start |
dd i_end ;à §¬¥à ¯à¨«®¦¥¨ï |
dd mem |
dd stacktop |
dd 0 |
dd sys_path |
color_border equ 0xff0000 |
color_s0 equ 0xff ;ᨣ « 0 |
color_s1 equ 0xffffff ;ᨣ « 1 |
color_s2 equ 0xff00 ;â®çª ¡¥§ ¯¥à¥á¥ç¥¨ï |
color_s3 equ 0xff0000 ;¢à¥¬¥®¥ § 票¥ ¤«ï á®åà ¥¨ï |
color_caption equ 0x808080 |
;®¬ à ¨ª®®ª: |
el_icon_group equ 0 ;£à㯯®¢ ï |
el_icon_points equ 1 ;â®çª¨ |
el_icon_sub_points equ 2 ;¨§®«ï樨 |
el_icon_elems equ 3 ;í«¥¬¥â |
el_icon_captions equ 4 ;¯®¤¯¨á¨ |
size_el_opt equ 34 ;à §¬¥à áâàãªâãàë á ®¯æ¨ï¬¨ í«¥¬¥â |
el_offs_nam equ 0 ;ᬥ饨¥ ¤«ï ç « ¨¬¥¨ í«¥¬¥â |
el_offs_col equ 16 ;梥â í«¥¬¥â |
el_offs_box_x equ 20 ;è¨à¨ ª®à®¡ª¨ í«¥¬¥â |
el_offs_box_y equ 21 ;¢ëá®â ª®à®¡ª¨ í«¥¬¥â |
el_offs_table equ 22 ;㪠§ ⥫ì â ¡«¨æã à ¡®âë í«¥¬¥â |
el_offs_legs_inp equ 26 ;ᬥ饨¥ ®¯¨á ¨¥ ¢å®¤ëå ®£ |
el_offs_legs_out equ 30 ;ᬥ饨¥ ®¯¨á ¨¥ ¢ë室ëå ®£ |
sp_offs_el_type equ 9 ;ᬥ饨¥ ¤«ï ⨯ í«¥¬¥â ¢ ᯨ᪥ |
points_max equ 1000 |
capt_offs equ 10 ;ᬥ饨¥ ¤«ï ç « ¯®¤¯¨á¨ ¢ «¨á⥠tree1 |
include '../../../macros.inc' |
include '../../../proc32.inc' |
include '../../../develop/libraries/box_lib/load_lib.mac' |
include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
include 'mem.inc' |
include 'dll.inc' |
include 'le_pole.inc' |
include 'le_signal.inc' |
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load |
caption db '®£¨ç¥áª¨¥ í«¥¬¥âë 15.03.12',0 ;¯®¤¯¨áì ®ª |
panel_0_coord_top equ 5 ;¢¥àåïï ª®®à¤¨ â 0-£® àï¤ ¯ ¥«¨ ¨áâà㬥⮢ |
panel_1_coord_top equ 35 |
panel_2_coord_top equ 60 |
panel_3_coord_top equ 85 |
align 4 |
proc move_rotate_x_n90 uses ecx edi, d_x:dword, angle:dword |
mov edi,[angle] ;㣮« ¯®¢®à®â / 90 (®â 0-3) |
and edi,3 |
shl edi,4 ;edi*=16 |
add edi,mcs |
mov ecx,[d_x] |
imul ecx,dword[edi] |
add eax,ecx |
mov ecx,[d_x] |
imul ecx,dword[edi+8] |
add ebx,ecx |
ret |
endp |
struct FileInfoBlock |
Function dd ? |
Position dd ? |
Flags dd ? |
Count dd ? |
Buffer dd ? |
db ? |
FileName dd ? |
ends |
macro elOpt nam,col,box_x,box_y,table, il0, il1, il2, ol0, ol1, ol2 |
{ |
@@: db nam |
rb @b+16-$ |
dd col |
db box_x |
db box_y |
dd table+0 ;+el_offs_table |
;+26 |
db il0+0 ;0-ï ¢å®¤ ï ®£ |
db il1+0 ;1-ï ¢å®¤ ï ®£ |
db il2+0 |
db 0 |
;+30 |
db ol0+0 |
db ol1+0 |
db ol2+0 |
db 0 |
} |
align 4 |
el_opt_beg: |
elOpt 'or[2]', 0xff00ff,5,5,tbl_or, 1,2,, 2 |
elOpt 'or[3]', 0xff00ff,5,7,tbl_or, 1,2,2, 3 |
elOpt 'and[2]',0xffff00,5,5,tbl_and.2, 1,2,, 2 |
elOpt 'and[3]',0xffff00,5,7,tbl_and.3, 1,2,2, 3 |
elOpt 'not', 0xffff,3,3,tbl_not, 1,,, 1 |
elOpt 'xor', 0x8000ff,5,5,tbl_xor, 1,2,, 2 |
elOpt 'sm[1]', 0x8080ff,7,7,tbl_sm, 1,2,2, 1,4 |
.end: |
elOpt '???', 0x808080,3,3,tbl_and.3, 1,,, 1 ;¥ ®¯®§ ë© í«¥¬¥â |
;â ¡«¨æë ¯® ª®â®àë¬ § ¤ îâáï ¯à ¢¨« à ¡®âë í«¥¬¥â®¢ |
align 4 |
tbl_or db 0,1,1,1, 1,1,1,1 ;or2, or3 |
tbl_and: |
.3: db 0,0,0,0 |
.2: db 0,0,0,1 |
tbl_xor db 0,1,1,0 |
tbl_sm db 0,2,2,1, 2,1,1,3 |
tbl_not db 1,0 ;not |
time dd 0 |
tim_ch db 0 |
pen_mode dd 0 ;०¨¬ à¨á®¢ ¨ï ¯à®¢®¤ |
txt_set_0 db '0',0 |
txt_set_1 db '1',0 |
txt_mov_l db 27,0 ;<- |
txt_mov_r db 26,0 ;-> |
txt_size db 'size',0 |
txt_elements db 'elements',0 |
txt_points db 'points',0 |
txt_sub_points db 'subpoints',0 |
txt_captions db 'captions',0 |
;¬ âà¨æ ª®á¨ãᮢ ¨ á¨ãᮢ, ¨á¯®«ì§ã¥¬ ï ¤«ï ¯®¢®à®â®¢ ᨣ «®¢ ¨ í«¥¬¥â®¢ |
align 4 |
mcs dd 1, 0, 0, 1,\ |
0, 1,-1, 0,\ |
-1, 0, 0,-1,\ |
0,-1, 1, 0 |
run_file_70 FileInfoBlock |
image_data dd 0 ;㪠§ â¥«ì ¢à¥¬¥ãî ¯ ¬ïâì. ¤«ï 㦥 ¯à¥®¡à §®¢ ¨ï ¨§®¡à ¦¥¨ï |
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3 |
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*15 |
image_data_toolbar dd 0 |
TREE_ICON_SYS16_BMP_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*11+54 ;à §¬¥à bmp ä ©« á á¨á⥬묨 ¨ª®ª ¬¨ |
icon_tl_sys dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª |
TOOLBAR_ICON_BMP_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*5+54 ;à §¬¥à bmp ä ©« á ¨ª®ª ¬¨ ®¡ê¥ªâ®¢ |
icon_toolbar dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï ¨ª®®ª ®¡ê¥ªâ®¢ |
IMAGE_FONT_SIZE equ 128*144*3 |
image_data_gray dd 0 ;¯ ¬ïâì á ¢à¥¬¥ë¬¨ á¥à묨 ¨§®¡à ¦¥¨ï¬¨ ¢ ä®à¬ ⥠24-bit, ¨§ ª®â®àëå ¡ã¤ãâ ᮧ¤ ¢ âìáï âà ä à¥âë |
macro load_image_file path,buf,size { ;¬ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥¨© |
;path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬ |
if path eqtype '' ;¯à®¢¥à塞 § ¤ «¨ áâப®© ¯ à ¬¥âà path |
jmp @f |
local .path_str |
.path_str db path ;ä®à¬¨à㥬 «®ª «ìãî ¯¥à¥¬¥ãî |
db 0 |
@@: |
;32 - áâ ¤ àâë© ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥ ¡ëâì ¡ãä¥à á á¨áâ¥¬ë¬ ¯ã⥬ |
copy_path .path_str,[32],file_name,0x0 |
else |
copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ® ¢ ®¤®© ¯ ¯ª¥ á ¯à®£à ¬¬®© |
end if |
stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥¨ï |
mov [buf],eax |
mov eax,70 ;70-ï äãªæ¨ï à ¡®â á ä ©« ¬¨ |
mov [run_file_70.Function], 0 |
mov [run_file_70.Position], 0 |
mov [run_file_70.Flags], 0 |
mov [run_file_70.Count], dword size |
m2m [run_file_70.Buffer], [buf] |
mov byte[run_file_70+20], 0 |
mov [run_file_70.FileName], file_name |
mov ebx,run_file_70 |
int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥¨ï |
cmp ebx,0xffffffff |
je @f |
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥ë© ¡ãä¥à image_data |
stdcall dword[img_decode], dword[buf],ebx,0 |
mov dword[image_data],eax |
;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥¨¥ ª ä®à¬ âã rgb |
stdcall dword[img_to_rgb2], dword[image_data],dword[buf] |
;㤠«ï¥¬ ¢à¥¬¥ë© ¡ãä¥à image_data |
stdcall dword[img_destroy], dword[image_data] |
@@: |
} |
align 4 |
start: |
load_libraries l_libs_start,l_libs_end |
;¯à®¢¥àª ᪮«ìª® ã¤ ç® § £ã§¨« áì ¡¨¡«¨®â¥ª |
mov ebp,lib_7 |
cmp dword [ebp+ll_struc_size-4],0 |
jz @f |
mcall -1 ;exit not correct |
@@: |
mcall 48,3,sc,sizeof.system_colors |
mcall 40,0x27 |
stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª ¤¨ «®£ |
stdcall [buf2d_create], buf_0 ;ᮧ¤ ¨¥ ¡ãä¥à |
load_image_file 'toolbar.png', image_data_toolbar,IMAGE_TOOLBAR_SIZE |
stdcall pole_init, pole |
stdcall dword[tl_data_init], tree1 |
;á¨áâ¥¬ë¥ ¨ª®ª¨ 16*16 ¤«ï tree_list |
load_image_file 'tl_sys_16.png', icon_tl_sys,TREE_ICON_SYS16_BMP_SIZE |
;¥á«¨ ¨§®¡à ¦¥¨¥ ¥ ®âªàë«®áì, â® ¢ icon_tl_sys ¡ã¤ãâ |
;¥ ¨¨æ¨ «¨§¨à®¢ ë¥ ¤ ë¥, ® ®è¨¡ª¨ ¥ ¡ã¤¥â, â. ª. ¡ãä¥à 㦮£® à §¬¥à |
mov eax,dword[icon_tl_sys] |
mov dword[tree1.data_img_sys],eax |
load_image_file 'objects.png', icon_toolbar,TOOLBAR_ICON_BMP_SIZE |
mov eax,dword[icon_toolbar] |
mov dword[tree1.data_img],eax |
load_image_file 'font6x9.bmp', image_data_gray,IMAGE_FONT_SIZE |
stdcall [buf2d_create_f_img], buf_font,[image_data_gray] ;ᮧ¤ ¥¬ ¡ãä¥à |
stdcall mem.Free,[image_data_gray] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì |
stdcall [buf2d_conv_24_to_8], buf_font,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç®á⨠8 ¡¨â |
stdcall [buf2d_convert_text_matrix], buf_font |
stdcall sign_init, 3000 |
mcall 26,9 |
mov [last_time],eax |
align 4 |
red_win: |
call draw_window |
align 4 |
still: |
mcall 26,9 |
mov ebx,[last_time] |
add ebx,10 ;§ ¤¥à¦ª |
cmp ebx,eax |
jge @f |
mov ebx,eax |
@@: |
sub ebx,eax |
;cmp ebx,10 ;§ ¤¥à¦ª |
;ja timer_funct |
;test ebx,ebx |
;jz timer_funct |
mcall 23 |
cmp eax,0 |
je timer_funct |
cmp al,1 |
jz red_win |
cmp al,EV_KEY |
jz key |
cmp al,3 |
jz button |
cmp al,EV_MOUSE |
jne @f |
call mouse |
@@: |
jmp still |
align 4 |
timer_funct: |
pushad |
mcall 26,9 |
mov [last_time],eax |
cmp byte[tim_ch],0 |
je @f |
inc dword[time] |
call sign_move |
mov eax,[time] |
and eax,11b ;ªà â®áâì 4-¬ |
jnz @f |
call sign_from_elems |
call sign_from_captions |
@@: |
popad |
jmp still |
align 4 |
mouse: |
stdcall [tl_mouse], tree1 |
push eax ebx ecx edx |
mcall 37,2 ; ¦ âë¥ ª®¯ª¨ ¬ëè¨ |
bt eax,0 ;«¥¢ ï ª®¯ª ¦ â ? |
jnc .end_buf_wnd |
mcall 37,1 ;eax = (x shl 16) + y |
cmp ax,word[buf_0.t] |
jl .end_buf_wnd ;¥ ¯®¯ «¨ ¢ ®ª® ¡ãä¥à ¯® ®á¨ y |
mov ebx,eax |
shr ebx,16 |
cmp bx,word[buf_0.l] |
jl .end_buf_wnd ;¥ ¯®¯ «¨ ¢ ®ª® ¡ãä¥à ¯® ®á¨ x |
and eax,0xffff ;®áâ ¢«ï¥¬ ª®®à¤¨ âã y |
sub ax,word[buf_0.t] |
sub bx,word[buf_0.l] |
;*** ¤¥«¥¨¥ zoom |
movzx ecx,byte[zoom] |
xor edx,edx |
div ecx |
xchg eax,ebx ;ebx ¤¥«¨¬ ecx |
xor edx,edx |
div ecx |
sub eax,[Cor_x] |
sub ebx,[Cor_y] |
;*** ¯à®¢¥àª ¯®¯ ¤¥¨¥ ¢ á奬ã |
bt eax,31 |
jc .end_buf_wnd |
bt ebx,31 |
jc .end_buf_wnd |
cmp eax,[shem_w] |
jge .end_buf_wnd |
cmp ebx,[shem_h] |
jge .end_buf_wnd |
cmp byte[pen_mode],1 |
jne @f |
;०¨¬ à¨á®¢ ¨ï ¯à®¢®¤ |
stdcall pole_cell_creat, pole,eax,ebx,0 |
;¨ç¥£® ¥ ã¡à «®áì redraw_pole ¥ ¯®¤å®¤¨â, â. ª. ç¨áâ¨âì ¯®«¥ ¥ 㦮 |
stdcall pole_paint, pole |
stdcall [buf2d_draw], buf_0 |
;stdcall but_test_pole, pole |
jmp .end_buf_wnd |
@@: |
cmp byte[pen_mode],2 |
jne @f |
;०¨¬ à¨á®¢ ¨ï ¨§®«ï樨 ¤«ï ¯à®¢®¤ |
stdcall pole_cell_creat, pole,eax,ebx,2 |
stdcall pole_paint, pole |
stdcall [buf2d_draw], buf_0 |
;stdcall but_test_pole, pole |
jmp .end_buf_wnd |
@@: |
cmp byte[pen_mode],3 |
jne @f |
;०¨¬ áâ¨à ¨ï ¯à®¢®¤ |
stdcall pole_cell_delete, pole,eax,ebx |
call redraw_pole |
;stdcall but_test_pole, pole |
jmp .end_buf_wnd |
@@: |
.end_buf_wnd: |
pop edx ecx ebx eax |
ret |
align 4 |
draw_window: |
pushad |
mcall 12,1 |
; *** à¨á®¢ ¨¥ £« ¢®£® ®ª (¢ë¯®«ï¥âáï 1 à § ¯à¨ § ¯ã᪥) *** |
xor eax,eax |
mov ebx,(20 shl 16)+520 |
mov ecx,(20 shl 16)+415 |
mov edx,[sc.work] |
or edx,(3 shl 24)+0x10000000+0x20000000 |
mov edi,caption |
int 0x40 |
; *** ᮧ¤ ¨¥ ª®¯®ª ¯ ¥«ì *** |
mov eax,8 |
mov ebx,(5 shl 16)+20 |
mov ecx,(panel_0_coord_top shl 16)+20 |
mov edx,3 |
mov esi,[sc.work_button] |
int 0x40 |
mov ebx,(30 shl 16)+20 |
mov edx,4 |
int 0x40 |
mov ebx,(55 shl 16)+20 |
mov edx,5 |
int 0x40 |
mov ebx,(85 shl 16)+20 |
mov edx,6 |
int 0x40 |
mov ebx,(110 shl 16)+20 |
mov edx,7 |
int 0x40 |
mov ebx,(135 shl 16)+20 |
mov edx,8 |
int 0x40 |
mov ebx,(160 shl 16)+20 |
mov edx,9 |
int 0x40 |
mov ebx,(185 shl 16)+20 |
mov edx,10 |
int 0x40 |
mov ebx,(210 shl 16)+20 |
mov edx,11 |
int 0x40 |
mov ebx,(235 shl 16)+20 |
mov edx,12 |
int 0x40 |
mov ebx,(265 shl 16)+20 |
mov edx,13 |
int 0x40 |
; *** à¨á®¢ ¨¥ ¨ª®®ª ª®¯ª å *** |
mov eax,7 |
mov ebx,[image_data_toolbar] |
mov ecx,(16 shl 16)+16 |
mov edx,(7 shl 16)+panel_0_coord_top+2 ;icon new |
int 0x40 |
add ebx,IMAGE_TOOLBAR_ICON_SIZE |
add edx,(25 shl 16) ;icon open |
int 0x40 |
add ebx,IMAGE_TOOLBAR_ICON_SIZE |
add edx,(25 shl 16) ;icon save |
int 0x40 |
add ebx,IMAGE_TOOLBAR_ICON_SIZE |
add edx,(30 shl 16) ;+ |
int 0x40 |
add ebx,IMAGE_TOOLBAR_ICON_SIZE |
add edx,(25 shl 16) ;- |
int 0x40 |
add ebx,IMAGE_TOOLBAR_ICON_SIZE |
add edx,(25 shl 16) ; |
int 0x40 |
add ebx,IMAGE_TOOLBAR_ICON_SIZE |
add edx,(25 shl 16) ;m |
int 0x40 |
add ebx,IMAGE_TOOLBAR_ICON_SIZE |
add edx,(25 shl 16) ;m |
int 0x40 |
add ebx,IMAGE_TOOLBAR_ICON_SIZE |
add edx,(25 shl 16) ;m |
int 0x40 |
add ebx,IMAGE_TOOLBAR_ICON_SIZE |
add edx,(25 shl 16) ;m |
int 0x40 |
add ebx,IMAGE_TOOLBAR_ICON_SIZE |
add edx,(30 shl 16) ;center |
int 0x40 |
; *** à¨á®¢ ¨¥ ¡ãä¥à *** |
stdcall [buf2d_draw], buf_0 |
mov dword[wScrObj.all_redraw],1 |
stdcall [tl_draw], tree1 |
stdcall pole_draw_pok, pole |
; *** ᮧ¤ ¨¥ ª®¯®ª ãáâ ®¢ª¨ ᨣ «®¢ set_0 ¨ set_1 *** |
mov eax,8 |
mov ebx,(5 shl 16)+20 |
mov ecx,(panel_1_coord_top shl 16)+20 |
mov edx,20 |
mov esi,[sc.work_button] |
int 0x40 |
add ebx,25 shl 16 |
mov edx,21 |
int 0x40 |
add ebx,30 shl 16 |
mov edx,22 |
int 0x40 |
add ebx,25 shl 16 |
mov edx,23 |
int 0x40 |
add ebx,25 shl 16 |
mov edx,24 |
int 0x40 |
add ebx,25 shl 16 |
mov edx,25 |
int 0x40 |
mov eax,4 ;à¨á®¢ ¨¥ ⥪áâ |
mov ebx,(10 shl 16)+panel_1_coord_top+5 |
mov ecx,[sc.work_text] |
or ecx,0x80000000 ;or (1 shl 30) |
mov edx,txt_set_0 |
;mov edi,[sc.work] |
int 0x40 |
add ebx,25 shl 16 |
mov edx,txt_set_1 |
int 0x40 |
add ebx,35 shl 16 |
mov edx,txt_mov_l |
int 0x40 |
add ebx,25 shl 16 |
mov edx,txt_mov_r |
int 0x40 |
; *** ᮧ¤ ¨¥ ª®¯®ª à¨á®¢ ¨ï ¯à®¢®¤ *** |
mov eax,8 |
mov ebx,(5 shl 16)+20 |
mov ecx,(panel_2_coord_top shl 16)+20 |
mov edx,30 |
mov esi,[sc.work_button] |
int 0x40 |
add ebx,25 shl 16 |
mov edx,31 |
int 0x40 |
add ebx,25 shl 16 |
mov edx,32 |
int 0x40 |
add ebx,25 shl 16 |
mov edx,33 |
int 0x40 |
; *** à¨á®¢ ¨¥ ¨ª®®ª ª®¯ª å *** |
mov eax,7 |
mov ebx,[image_data_toolbar] |
mov ecx,(16 shl 16)+16 |
mov edx,(7 shl 16)+panel_2_coord_top+2 ;¨ª®ª áâ५ |
add ebx,IMAGE_TOOLBAR_ICON_SIZE*11 |
int 0x40 |
add ebx,IMAGE_TOOLBAR_ICON_SIZE |
add edx,(25 shl 16) ;icon pen 1 |
int 0x40 |
add ebx,IMAGE_TOOLBAR_ICON_SIZE |
add edx,(25 shl 16) ;icon pen 2 |
int 0x40 |
add ebx,IMAGE_TOOLBAR_ICON_SIZE |
add edx,(25 shl 16) ;icon pen 3 |
int 0x40 |
mcall 12,2 |
popad |
ret |
align 4 |
key: |
mcall 2 |
stdcall [tl_key], dword tree1 |
jmp still |
align 4 |
button: |
mcall 17 |
cmp ah,3 |
jne @f |
call but_new_file |
@@: |
cmp ah,4 |
jne @f |
call but_open_file |
@@: |
cmp ah,5 |
jne @f |
call but_save_file |
@@: |
cmp ah,6 |
jne @f |
call but_run_stop |
@@: |
cmp ah,7 |
jne @f |
call but_zoom_p |
@@: |
cmp ah,8 |
jne @f |
call but_zoom_m |
@@: |
cmp ah,9 |
jne @f |
call but_pole_left |
@@: |
cmp ah,10 |
jne @f |
call but_pole_right |
@@: |
cmp ah,11 |
jne @f |
call but_pole_up |
@@: |
cmp ah,12 |
jne @f |
call but_pole_dn |
@@: |
cmp ah,13 |
jne @f |
call but_center |
@@: |
cmp ah,20 |
jne @f |
call but_set_0 |
@@: |
cmp ah,21 |
jne @f |
call but_set_1 |
@@: |
cmp ah,22 |
jne @f |
call but_mov_l |
@@: |
cmp ah,23 |
jne @f |
call but_mov_r |
@@: |
cmp ah,24 |
jne @f |
call but_mov_u |
@@: |
cmp ah,25 |
jne @f |
call but_mov_d |
@@: |
cmp ah,30 |
jne @f |
call but_set_none |
@@: |
cmp ah,31 |
jne @f |
call but_set_pen_1 |
@@: |
cmp ah,32 |
jne @f |
call but_set_pen_2 |
@@: |
cmp ah,33 |
jne @f |
call but_set_pen_3 |
@@: |
cmp ah,1 |
jne still |
.exit: |
stdcall [buf2d_delete],buf_0 |
stdcall [buf2d_delete],buf_font |
stdcall mem.Free,[image_data_toolbar] |
stdcall pole_delete, pole |
call sign_delete |
stdcall [tl_data_clear], tree1 |
mcall -1 |
align 4 |
but_new_file: |
stdcall pole_clear, pole |
call redraw_pole |
ret |
align 4 |
f_size dd 0 ;à §¬¥à ®âªàë¢ ¥¬®£® ä ©« |
shem_w dd 192 ;è¨à¨ á奬ë |
shem_h dd 128 ;¢ëá®â á奬ë |
shem_points dd 0 ;ª®««¨ç¥á⢮ 㧫®¢ á奬¥ |
shem_sub_points dd 0 ;ª®««¨ç¥á⢮ ¨§®«¨à®¢ ëå 㧫®¢ á奬¥ |
shem_elems dd 0 ;ª®««¨ç¥á⢮ í«¥¬¥â®¢ á奬¥ |
shem_captions dd 0 |
shem_colors: |
dd color_s0, color_s1, color_s2, color_s3 |
align 4 |
open_file_lif: |
rb 2*4096 ;®¡« áâì ¤«ï ®âªàëâ¨ï ä ©«®¢ |
.end: |
align 4 |
but_open_file: |
pushad |
copy_path open_dialog_name,communication_area_default_path,file_name,0 |
mov [OpenDialog_data.type],0 |
stdcall [OpenDialog_Start],OpenDialog_data |
cmp [OpenDialog_data.status],2 |
je .end_open_file |
;ª®¤ ¯à¨ 㤠箬 ®âªàë⨨ ¤¨ «®£ |
mov eax,70 ;70-ï äãªæ¨ï à ¡®â á ä ©« ¬¨ |
mov [run_file_70.Function], 0 |
mov [run_file_70.Position], 0 |
mov [run_file_70.Flags], 0 |
mov dword[run_file_70.Count], open_file_lif.end-open_file_lif |
m2m [run_file_70.Buffer], open_file_lif |
mov byte[run_file_70+20], 0 |
mov dword[run_file_70.FileName], openfile_path |
mov ebx,run_file_70 |
int 0x40 ;§ £à㦠¥¬ ä ©« |
cmp ebx,0xffffffff |
je .end_open_file |
mov dword[f_size],ebx |
add ebx,open_file_lif |
mov byte[ebx],0 ; á«ãç © ¥á«¨ à ¥¥ ¡ë« ®âªàëâ ä ©« ¡®«ì襣® à §¬¥à ç¨á⨬ ª®¥æ ¡ãä¥à á ä ©«®¬ |
mcall 71,1,openfile_path |
;--- |
;§ ¤ ¥¬ ¬¨¨¬ «ìë¥ § 票ï, á«ãç © ¥á«¨ ¢ ä ©«¥ ¡ã¤ãâ ¥ª®à¥ªâë¥ à §¬¥àë |
mov dword[shem_w],5 |
mov dword[shem_h],5 |
mov esi,txt_size |
call str_analiz_r |
cmp edi,0 |
je @f |
stdcall str_len,esi |
add edi,eax |
stdcall conv_str_to_int,edi |
cmp eax,5 |
jl @f ;®è¨¡ª ¢ ä ©«¥ ( .end_open_file ¥ ¯¥à¥å®¤¨¬, ¯ëâ ¥¬áï ¯à®ç¨â âì ¤àã£ãî ¨ä®à¬ æ¨î) |
mov dword[shem_w],eax |
call str_next_val |
stdcall conv_str_to_int,edi |
cmp eax,5 |
jl @f ;®è¨¡ª ¢ ä ©«¥ |
mov dword[shem_h],eax |
@@: |
stdcall [tl_info_clear],tree1 |
;*** ¤®¡ ¢«¥¨¥ ¢ ᯨ᮪ «®£¨ç¥áª¨å í«¥¬¥â®¢ *** |
stdcall [tl_node_add], txt_elements-capt_offs,(el_icon_group shl 16), tree1 |
stdcall [tl_cur_next], tree1 |
mov esi,txt_elements |
call str_analiz_r |
cmp edi,0 |
je .end_elems |
stdcall str_len,esi |
add edi,eax |
stdcall conv_str_to_int,edi |
cmp eax,0 |
jle .end_elems ;¥á«¨ ç¨á«® í«¥¬¥â®¢ = 0 |
mov [shem_elems],eax |
mov ecx,eax |
.cycle_elem: |
call str_next_val |
stdcall conv_str_to_int,edi |
mov dword[txt_buf],eax ;ª®®à¤¨ â x |
call str_next_val |
stdcall conv_str_to_int,edi |
mov dword[txt_buf+4],eax ;ª®®à¤¨ â y |
call str_next_val |
stdcall conv_str_to_int,edi |
mov byte[txt_buf+8],al ; ¯à ¢«¥¨¥ |
call str_next_val |
;¯® ¤à¥áã edi §¢ ¨¥ í«¥¬¥â |
stdcall el_get_name, edi |
mov byte[txt_buf+sp_offs_el_type],al ;⨯ í«¥¬¥â |
stdcall make_list_capts,txt_buf,edi |
stdcall [tl_node_add], txt_buf,(el_icon_elems shl 16)+1, tree1 |
stdcall [tl_cur_next], tree1 |
dec ecx |
jnz .cycle_elem |
.end_elems: |
;*** ¤®¡ ¢«¥¨¥ ¢ ᯨ᮪ ⥪á⮢ëå ¯®¤¯¨á¥© *** |
stdcall [tl_node_add], txt_captions-capt_offs,(el_icon_group shl 16), tree1 |
stdcall [tl_cur_next], tree1 |
mov esi,txt_captions |
call str_analiz_r |
cmp edi,0 |
je .end_captions |
stdcall str_len,esi |
add edi,eax |
stdcall conv_str_to_int,edi |
cmp eax,0 |
jle .end_captions ;¥á«¨ ç¨á«® ¯®¤¯¨á¥© = 0 |
mov [shem_captions],eax |
mov ecx,eax |
.cycle_captions: |
call str_next_val |
stdcall conv_str_to_int,edi |
mov dword[txt_buf],eax ;ª®®à¤¨ â x |
call str_next_val |
stdcall conv_str_to_int,edi |
mov dword[txt_buf+4],eax ;ª®®à¤¨ â y |
call str_next_val |
mov al,byte[edi] |
mov byte[txt_buf+8],al ;¢¨¤ ¯®¤¯¨á¨ ('z' - ᨣ « á 0, 'o' - ᨣ « á 1, 'n' - ¥â ᨣ « ) |
call str_next_val |
stdcall make_list_capts,txt_buf,edi |
stdcall [tl_node_add], txt_buf,(el_icon_captions shl 16)+1, tree1 |
stdcall [tl_cur_next], tree1 |
dec ecx |
jnz .cycle_captions |
.end_captions: |
mov byte[txt_buf+capt_offs],0 ;®¡ã«¥¨¥ ¯®¤¯¨á¥© |
;*** ¤®¡ ¢«¥¨¥ ¢ ᯨ᮪ ª«î祢ëå â®ç¥ª *** |
stdcall [tl_node_add], txt_points-capt_offs,(el_icon_group shl 16), tree1 |
stdcall [tl_cur_next], tree1 |
mov dword[shem_points],0 |
mov esi,txt_points |
call str_analiz_r |
cmp edi,0 |
je .end_points ;¥á«¨ ®¯¨á ¨ï â®ç¥ª ¥â ¢ ä ©«¥ |
stdcall str_len,esi |
add edi,eax |
stdcall conv_str_to_int,edi |
cmp eax,0 |
jle .end_points ;¥á«¨ ç¨á«® â®ç¥ª = 0 |
mov [shem_points],eax |
mov ecx,eax |
.cycle_poi: |
call str_next_val |
stdcall conv_str_to_int,edi |
mov dword[txt_buf],eax ;ª®®à¤¨ â x |
call str_next_val |
stdcall conv_str_to_int,edi |
mov dword[txt_buf+4],eax ;ª®®à¤¨ â y |
call str_next_val |
stdcall conv_str_to_int,edi |
mov byte[txt_buf+8],al ; ¯à ¢«¥¨ï |
; stdcall make_list_capts,txt_buf,0 |
stdcall [tl_node_add], txt_buf,(el_icon_points shl 16)+1, tree1 |
stdcall [tl_cur_next], tree1 |
dec ecx |
jnz .cycle_poi |
.end_points: |
stdcall [tl_cur_beg], tree1 |
;*** ¤®¡ ¢«¥¨¥ â®ç¥çëå ®¡ê¥ªâ®¢ *** |
stdcall pole_clear, pole |
stdcall dword[tl_node_poi_get_info],0,tree1 |
pop esi |
@@: |
cmp esi,0 |
je @f |
cmp word[esi],el_icon_points ;¯®«ã票¥ ç¥à¥§ esi ⨯ ¨ª®ª¨, ¨ ¯à®¯ã᪠¥ â®ç¥çëå ®¡ê¥ªâ®¢ |
jne .end_add_p0 |
stdcall [tl_node_poi_get_data], esi, tree1 |
pop eax |
stdcall pole_cell_creat, pole,dword[eax],dword[eax+4],0 |
.end_add_p0: |
stdcall dword[tl_node_poi_get_next_info],esi,tree1 |
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
jmp @b |
@@: |
stdcall pole_sort, pole |
;*** ¤®¡ ¢«¥¨¥ â®ç¥çëå ®¡ê¥ªâ®¢ ( ®á®¢¥ «®£¨ç¥áª¨å í«¥¬¥â®¢) *** |
stdcall dword[tl_node_poi_get_info],0,tree1 |
pop esi |
@@: |
cmp esi,0 |
je @f |
cmp word[esi],el_icon_elems ;¯®«ã票¥ ç¥à¥§ esi ⨯ ¨ª®ª¨ |
jne .end_add_p3 |
stdcall [tl_node_poi_get_data], esi, tree1 |
pop ecx |
xor edx,edx ;edx - ®¬¥à ¢å®¤®© ®£¨ |
.add_p1: |
stdcall el_get_leg_coords, ecx,edx |
test eax,eax |
jnz .add_beg1 |
test ebx,ebx |
jnz .add_beg1 |
jmp .end_add_p1 ;¥á«¨ ª®®à¤¨ âë ¥ ¢§ï«¨áì (eax=0 && ebx=0), ¢ë室 ¨§ 横« |
.add_beg1: |
stdcall pole_cell_creat, pole,eax,ebx,0 |
inc edx |
jmp .add_p1 |
.end_add_p1: |
mov edx,(1 shl 16) ;edx - ®¬¥à ¢ë室®© ®£¨ |
.add_p2: |
stdcall el_get_leg_coords, ecx,edx |
test eax,eax |
jnz .add_beg2 |
test ebx,ebx |
jnz .add_beg2 |
jmp .end_add_p2 ;¥á«¨ ª®®à¤¨ âë ¥ ¢§ï«¨áì (eax=0 && ebx=0), ¢ë室 ¨§ 横« |
.add_beg2: |
stdcall pole_cell_creat, pole,eax,ebx,0 |
inc edx |
jmp .add_p2 |
.end_add_p2: |
.end_add_p3: |
stdcall dword[tl_node_poi_get_next_info],esi,tree1 |
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
jmp @b |
@@: |
stdcall pole_sort, pole |
;*** ¤®¡ ¢«¥¨¥ â®ç¥çëå ®¡ê¥ªâ®¢ ( ®á®¢¥ ¯®¤¯¨á¥©) *** |
stdcall dword[tl_node_poi_get_info],0,tree1 |
pop esi |
@@: |
cmp esi,0 |
je @f |
cmp word[esi],el_icon_captions ;¯®«ã票¥ ç¥à¥§ esi ⨯ ¨ª®ª¨ |
jne .end_add_p6 |
stdcall [tl_node_poi_get_data], esi, tree1 |
pop ecx |
cmp byte[ecx+8],'n' |
je .end_add_p6 |
stdcall pole_cell_creat, pole,[ecx],[ecx+4],0 |
.end_add_p6: |
stdcall dword[tl_node_poi_get_next_info],esi,tree1 |
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
jmp @b |
@@: |
stdcall pole_sort, pole |
;*** à¨á®¢ ¨¥ ¯à®¢®¤®¢ ( ®á®¢¥ â®ç¥çëå ®¡ê¥ªâ®¢) *** |
stdcall dword[tl_node_poi_get_info],0,tree1 |
pop esi |
xor ecx,ecx |
@@: |
cmp esi,0 |
je @f |
cmp word[esi],el_icon_points ;¯®«ã票¥ ç¥à¥§ esi ⨯ ¨ª®ª¨, ¨ ¯à®¯ã᪠¥ â®ç¥çëå ®¡ê¥ªâ®¢ |
jne .end_add_p4 |
stdcall [tl_node_poi_get_data], esi, tree1 |
pop eax |
movzx ebx,byte[eax+8] |
stdcall shem_create_line, dword[eax],dword[eax+4],ebx |
add ecx,edx |
.end_add_p4: |
stdcall dword[tl_node_poi_get_next_info],esi,tree1 |
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
cmp ecx,250 ;ecx - ç¨á«® ¤®¡ ¢«¥ëå â®ç¥ª |
jl @b |
xor ecx,ecx |
stdcall pole_sort, pole ;á®àâ¨à㥬 ¤«ï ®¯â¨¬¨§ 樨 ¡ëáâத¥©á⢨ï |
jmp @b |
@@: |
stdcall pole_sort, pole |
stdcall pole_reset_cells, pole ;ç¨á⪠¯à®¢®¤®¢ |
;*** ¤®¡ ¢«¥¨¥ ¨§®«ï樮ëå ®¡ê¥ªâ®¢ (¯àאַ ¨§ ä ©« , ¬¨ãï § ¯¨áì ¢ ᯨ᮪) *** |
mov dword[shem_sub_points],0 |
mov esi,txt_sub_points |
call str_analiz_r |
cmp edi,0 |
je .end_sub_points ;¥á«¨ ®¯¨á ¨ï â®ç¥ª ¥â ¢ ä ©«¥ |
stdcall str_len,esi |
add edi,eax |
stdcall conv_str_to_int,edi |
cmp eax,0 |
jle .end_sub_points ;¥á«¨ ç¨á«® â®ç¥ª = 0 |
mov [shem_sub_points],eax |
mov ecx,eax |
.cycle_sub_poi: |
call str_next_val |
stdcall conv_str_to_int,edi |
mov ebx,eax ;ª®®à¤¨ â x |
call str_next_val |
stdcall conv_str_to_int,edi ;ª®®à¤¨ â y |
stdcall pole_cell_creat, pole,ebx,eax,2 |
dec ecx |
jnz .cycle_sub_poi |
.end_sub_points: |
stdcall pole_sort, pole |
;*** 㤠«¥¨¥ ª«î祢ëå â®ç¥ª ᮠᯨ᪠*** |
mov ecx,[shem_points] |
inc ecx |
cld |
@@: |
stdcall [tl_info_undo],tree1 |
loop @b |
;*** ä®à¬¨à®¢ ¨¥ ¯®¤¯¨á¥© ® ¯ à ¬¥âà å á奬ë *** |
mov dword[txt_info.size],0 |
mov eax,dword[shem_w] |
mov edi,txt_info.size |
call convert_int_to_str |
stdcall str_cat, edi,txt_mull |
mov eax,dword[shem_h] |
mov edi,txt_buf |
call convert_int_to_str |
stdcall str_cat, txt_info.size,edi |
stdcall str_cat, txt_info.size,txt_space ;§ ¢¥àè î騩 ¯à®¡¥« |
;--- |
call but_center ;æ¥â஢ª á奬ë á ãç¥â®¬ shem_w ¨ shem_h |
.end_open_file: |
popad |
ret |
align 4 |
proc but_save_file |
locals |
napr dd ? |
endl |
pushad |
;*** ¢ë§®¢ ¤¨ «®£®¢®£® ®ª ¤«ï á®åà ¥¨ï ä ©« |
copy_path open_dialog_name,communication_area_default_path,file_name,0 |
mov [OpenDialog_data.type],1 |
stdcall [OpenDialog_Start],OpenDialog_data |
cmp [OpenDialog_data.status],1 ;if status==1 then save |
jne .end_save_file |
;*** ¯à®¢¥àª ¥áâì «¨ ¯à®¢®¤ á奬¥ |
mov edi,pole |
mov esi,pole_index |
cmp dword[esi],0 |
je .cycle1_beg ;.end_save_file ;¥á«¨ ¥â ï祥ª (¯à®¢®¤®¢) â® ¢ë室 |
;*** ãáâ ¢«¨¢ ¥¬ ¬¥âª¨ ª«îç¥¢ë¥ â®çª¨, ª®â®àë¥ ¡ã¤ãâ á®åà ¥ë ¢ ä ©« |
mov dword[shem_points],0 ;¤«ï ¯¥à¥®¯à¥¤¥«¥¨ï â®ç¥ª |
mov dword[shem_sub_points],0 |
mov ecx,dword[esi] |
.cycle0: ;横« ¯® ¢á¥¬ â®çª ¬ |
add esi,4 |
mov ebx,[esi] |
imul ebx,sizeof.Cell |
add ebx,pole_data |
cmp byte[ebx+offs_cell_liv],2 |
jne @f |
inc dword[shem_sub_points] |
jmp .cycle0_next |
@@: |
mov dword[napr],0 |
mov edx,[ebx+offs_cell_y] |
push edx |
mov edx,[ebx+offs_cell_x] |
inc edx |
push edx |
stdcall pole_cell_find, edi |
cmp eax,0 |
je @f |
or dword[napr],1 |
@@: |
mov edx,[ebx+offs_cell_y] |
inc edx |
push edx |
mov edx,[ebx+offs_cell_x] |
push edx |
stdcall pole_cell_find, edi |
cmp eax,0 |
je @f |
or dword[napr],2 |
@@: |
mov edx,[ebx+offs_cell_y] |
push edx |
mov edx,[ebx+offs_cell_x] |
dec edx |
push edx |
stdcall pole_cell_find, edi |
cmp eax,0 |
je @f |
or dword[napr],4 |
@@: |
mov edx,[ebx+offs_cell_y] |
dec edx |
push edx |
mov edx,[ebx+offs_cell_x] |
push edx |
stdcall pole_cell_find, edi |
cmp eax,0 |
je @f |
or dword[napr],8 |
@@: |
cmp dword[napr],5 |
je @f |
cmp dword[napr],10 |
je @f |
cmp dword[napr],15 |
je @f |
mov eax,dword[napr] |
mov byte[ebx+offs_cell_liv],3 ;ãáâ ®¢ª ¬¥âª¨ |
mov byte[ebx+offs_cell_napr],al ;ãáâ ®¢ª ¯à ¢«¥¨© |
inc dword[shem_points] |
@@: |
.cycle0_next: |
dec ecx |
jnz .cycle0 |
;*** áï⨥ ¬¥âª¨ á â®ç¥ª, ª®â®àë¥ å®¤ïâáï ¢å®¤ëå ®£ å «®£¨ç¥áª¨å í«¥¬¥â®¢ |
.cycle1_beg: |
mov dword[shem_elems],0 ;¤«ï ¯¥¯¥®¯à¥¤¥«¥¨ï ç¨á« í«¥¬¥â®¢ |
stdcall dword[tl_node_poi_get_info],0,tree1 |
pop esi |
.cycle1: |
cmp esi,0 |
je .cycle1_end |
cmp word[esi],el_icon_elems ;¯®«ã票¥ ç¥à¥§ esi ⨯ ¨ª®ª¨ |
jne .end_add_p1 |
stdcall [tl_node_poi_get_data], esi, tree1 |
pop ecx |
inc dword[shem_elems] |
xor edx,edx ;edx - ®¬¥à ¢å®¤®© ®£¨ |
@@: |
stdcall el_get_leg_coords, ecx,edx |
test eax,eax |
jz @f ;¥á«¨ ª®®à¤¨ âë ¥ ¢§ï«¨áì (eax=0 && ebx=0) |
test ebx,ebx |
jz @f ;¥á«¨ ª®®à¤¨ âë ¥ ¢§ï«¨áì (eax=0 && ebx=0) |
stdcall pole_cell_find, edi,eax,ebx |
test eax,eax |
jz .no_erase |
get_cell_offset ebx,eax |
mov byte[ebx+offs_cell_liv],0 ;áï⨥ ¬¥âª¨ |
dec dword[shem_points] |
.no_erase: |
inc edx |
jmp @b |
@@: |
;mov edx,(1 shl 16) ;edx - ®¬¥à ¢ë室®© ®£¨ |
.end_add_p1: |
stdcall dword[tl_node_poi_get_next_info],esi,tree1 |
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
jmp .cycle1 |
.cycle1_end: |
;*** ᮧ¤ ¨¥ ¨ä®à¬ 樨 ¤«ï § ¯¨á¨ ¢ ä ©« *** |
mov edi,open_file_lif |
stdcall mem_copy,edi,txt_size,5 |
stdcall str_cat,edi,txt_space |
mov eax,dword[shem_w] |
add edi,5 |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_space |
stdcall str_len,edi |
add edi,eax |
mov eax,[shem_h] |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_nl |
;*** á®åà ¥¨¥ «®£¨ç¥áª¨å í«¥¬¥â®¢ *** |
stdcall str_cat,edi,txt_elements |
stdcall str_cat,edi,txt_space |
stdcall str_len,edi |
add edi,eax |
mov eax,[shem_elems] |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_nl |
cmp eax,1 |
jl .cycle2_end |
stdcall dword[tl_node_poi_get_info],0,tree1 |
pop esi |
.cycle2: |
cmp esi,0 |
je .cycle2_end |
cmp word[esi],el_icon_elems ;¯®«ã票¥ ç¥à¥§ esi ⨯ ¨ª®ª¨ |
jne .end_add_p2 |
stdcall [tl_node_poi_get_data], esi, tree1 |
pop ecx |
stdcall str_len,edi |
add edi,eax |
mov eax,[ecx] ;coord x |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_space |
stdcall str_len,edi |
add edi,eax |
mov eax,[ecx+4] ;coord y |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_space |
stdcall str_len,edi |
add edi,eax |
movzx eax,byte[ecx+8] ;angle |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_space |
;¨¬ï í«¥¬¥â |
movzx eax,byte[ecx+sp_offs_el_type] |
imul eax,size_el_opt |
add eax,el_opt_beg+el_offs_nam |
stdcall str_cat,edi,eax |
stdcall str_cat,edi,txt_nl |
.end_add_p2: |
stdcall dword[tl_node_poi_get_next_info],esi,tree1 |
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
jmp .cycle2 |
.cycle2_end: |
;*** á®åà ¥¨¥ ¯®¤¯¨á¥© *** |
stdcall str_cat,edi,txt_captions |
stdcall str_cat,edi,txt_space |
stdcall str_len,edi |
add edi,eax |
mov eax,[shem_captions] |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_nl |
cmp eax,1 |
jl .cycle3_end |
stdcall dword[tl_node_poi_get_info],0,tree1 |
pop esi |
.cycle3: |
cmp esi,0 |
je .cycle3_end |
cmp word[esi],el_icon_captions ;¯®«ã票¥ ç¥à¥§ esi ⨯ ¨ª®ª¨ |
jne .end_add_p3 |
stdcall [tl_node_poi_get_data], esi, tree1 |
pop ecx |
stdcall str_len,edi |
add edi,eax |
mov eax,[ecx] ;coord x |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_space |
stdcall str_len,edi |
add edi,eax |
mov eax,[ecx+4] ;coord y |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_space |
stdcall str_len,edi |
add edi,eax |
movzx eax,byte[ecx+8] ;n,z,o |
mov ah,' ' ;¯à®¡¥« ¯®á«¥ ¡ãª¢ë, çâ® ¡ë ¥ ¤®¡ ¢«ïâì txt_space |
mov dword[edi],eax ;al |
;¨¬ï í«¥¬¥â |
mov ebx,edi |
mov edi,ecx |
add edi,capt_offs |
call str_next_val |
call str_next_val |
;call str_next_val |
xchg ebx,edi |
stdcall str_cat,edi,ebx |
stdcall str_cat,edi,txt_nl |
.end_add_p3: |
stdcall dword[tl_node_poi_get_next_info],esi,tree1 |
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
jmp .cycle3 |
.cycle3_end: |
;*** á®åà ¥¨¥ ª«î祢ëå â®ç¥ª *** |
stdcall str_cat,edi,txt_points |
stdcall str_cat,edi,txt_space |
stdcall str_len,edi |
add edi,eax |
mov eax,[shem_points] |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_nl |
mov eax,edi |
mov edi,pole |
mov esi,pole_index |
cmp dword[esi],0 |
je .no_points ;¥á«¨ ¥â ï祥ª (¯à®¢®¤®¢) â® ¯à®¯ã᪠|
mov ebx,pole_data |
mov dword[napr],ebx |
mov edi,eax |
mov ecx,dword[esi] |
.cycle4: ;横« ¯® ¢á¥¬ â®çª ¬ |
add esi,4 |
mov ebx,[esi] |
imul ebx,sizeof.Cell |
add ebx,dword[napr] ;pole_data |
movzx edx,word[ebx+offs_cell_liv] ;also use offs_cell_napr |
cmp dl,3 |
jne @f |
stdcall str_len,edi |
add edi,eax |
mov eax,dword[ebx+offs_cell_x] |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_space |
stdcall str_len,edi |
add edi,eax |
mov eax,dword[ebx+offs_cell_y] |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_space |
stdcall str_len,edi |
add edi,eax |
movzx eax,dh |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_space |
;stdcall str_cat,edi,txt_nl |
@@: |
dec ecx |
jnz .cycle4 |
stdcall str_cat,edi,txt_nl |
;*** á®åà ¥¨¥ ¨§®«ï樮ëå â®ç¥ª *** |
stdcall str_cat,edi,txt_sub_points |
stdcall str_cat,edi,txt_space |
stdcall str_len,edi |
add edi,eax |
mov eax,[shem_sub_points] |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_nl |
mov eax,edi |
mov edi,pole |
mov esi,pole_index |
;cmp dword[esi],0 |
;je .no_points ;¥á«¨ ¥â ï祥ª (¯à®¢®¤®¢) â® ¯à®¯ã᪠|
;mov ebx,pole_data |
;mov dword[napr],ebx |
mov edi,eax |
mov ecx,dword[esi] |
.cycle5: ;横« ¯® ¢á¥¬ â®çª ¬ |
add esi,4 |
mov ebx,[esi] |
imul ebx,sizeof.Cell |
add ebx,dword[napr] ;pole_data |
movzx edx,byte[ebx+offs_cell_liv] |
cmp dl,2 |
jne @f |
stdcall str_len,edi |
add edi,eax |
mov eax,dword[ebx+offs_cell_x] |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_space |
stdcall str_len,edi |
add edi,eax |
mov eax,dword[ebx+offs_cell_y] |
stdcall convert_int_to_str |
stdcall str_cat,edi,txt_space |
;stdcall str_cat,edi,txt_nl |
@@: |
dec ecx |
jnz .cycle5 |
stdcall str_cat,edi,txt_nl |
.no_points: |
;*** ®¯à¥¤¥«¥¨¥ ¯ à ¬¥â஢ ä ©« |
mov edi,open_file_lif |
stdcall str_len,edi |
mov ecx,eax |
;*** § ¯¨áì ä ©« |
mov eax,70 |
mov [run_file_70.Function], 2 |
mov [run_file_70.Position], 0 |
mov [run_file_70.Flags], 0 |
mov dword[run_file_70.Count], ecx |
mov [run_file_70.Buffer], edi |
mov byte[run_file_70+20], 0 |
mov dword[run_file_70.FileName], openfile_path |
mov ebx,run_file_70 |
int 0x40 ;á®åà 塞 ä ©« |
call redraw_pole |
.end_save_file: |
popad |
ret |
endp |
;ä®à¬¨à®¢ ¨¥ ¯®¤¯¨á¨ ¤«ï ᯨ᪠|
align 4 |
proc make_list_capts uses eax ebx ecx edi, buf:dword, txt:dword |
mov ebx,dword[buf] |
mov edi,ebx |
add edi,capt_offs |
mov dword[edi],' ' ;¯à®¡¥«ë ¤«ï ¢ëà ¢¨¢ ¨ï ¬ «¥ìª¨å ç¨á¥« |
mov eax,dword[ebx] ;+0 - offset coord x |
cmp eax,100 |
jge @f |
inc edi |
@@: |
cmp eax,10 |
jge @f |
inc edi |
@@: |
call convert_int_to_str ;ª®®à¤¨ â x (¤«ï ¯®¤¯¨á¨) |
stdcall str_cat,edi,txt_space |
stdcall str_len,edi |
add edi,eax |
mov eax,dword[ebx+4] ;+4 - offset coord y |
call convert_int_to_str ;ª®®à¤¨ â y (¤«ï ¯®¤¯¨á¨) |
stdcall str_cat,edi,txt_space |
mov edi,dword[txt] |
cmp edi,0 |
je .end_f |
stdcall str_len,edi ;eax = strlen([edi]) |
mov ecx,edi |
call str_next_spaces |
sub edi,ecx ;®¯à¥¤¥«ï¥¬ ¤«¨ã ¯®¤¯¨á¨ |
cmp edi,eax |
jle @f |
mov edi,eax ;¥á«¨ áâப § ª®ç¨« áì ¥ ¯à®¡¥«®¬ |
@@: |
;cmp edi,1 |
;jge @f |
; mov edi,1 ;¬¨¨¬ã¬ 1 ᨬ¢®« |
;@@: |
add ebx,capt_offs |
stdcall str_n_cat, ebx,ecx,edi |
.end_f: |
ret |
endp |
;output: |
; eax - ⨯ í«¥¬¥â |
align 4 |
proc el_get_name uses ecx edi esi, str:dword |
mov edi,[str] |
mov esi,el_opt_beg+el_offs_nam |
xor ecx,ecx |
@@: |
stdcall str_instr, edi,esi |
cmp eax,0 |
je @f |
add esi,size_el_opt |
cmp esi,el_opt_beg.end |
jge @f |
inc ecx |
jmp @b |
@@: |
mov eax,ecx |
ret |
endp |
;input: |
; el_data - 㪠§ â¥«ì ¤ ë¥ í«¥¬¥â |
; l_opt - ®¬¥à ®£¨, ¤«ï ª®â®à®© ¨éãâáï ª®®à¤¨ âë, ¢å®¤ ï/¢ë室 ï ®£ |
;output: |
; eax - coord x (if not found eax=0) |
; ebx - coord y (if not found ebx=0) |
align 4 |
proc el_get_leg_coords uses ecx edx edi esi, el_data:dword, l_opt:dword |
mov edi,[el_data] ;¤ ë¥ í«¥¬¥â |
movzx esi,byte[edi+sp_offs_el_type] ;⨯ í«¥¬¥â |
imul esi,size_el_opt |
add esi,el_opt_beg |
;esi+el_offs_legs_inp - 㪠§ â¥«ì ¯ à ¬¥âàë 0-© ¢å®¤®© ®£¨ |
mov eax,[edi+0] |
mov ebx,[edi+4] |
mov edx,[l_opt] |
movzx edi,byte[edi+8] ;㣮« ¯®¢®à®â / 90 (®â 0-3) |
btr edx,16 ;¢å®¤ ï/¢ë室 ï ®£ |
jc .output_leg |
;¥á«¨ ®£ ¢å®¤ ï |
inc edx ;®¬¥à æ¨ï ®£ ç¨ ¥âáï á ã«ï, ¯®â®¬ã ¤®¡ ¢«ï¥¬ 1 |
stdcall move_rotate_x_n90, -2,edi |
add esi,el_offs_legs_inp |
@@: |
movzx ecx,byte[esi] |
cmp ecx,0 |
je .not_found ;®£¨ ª®ç¨«¨áì à ìè¥, 祬 ®¦¨¤ «®áì |
stdcall move_rotate_n90, 0,ecx,edi |
inc esi |
dec edx |
jnz @b |
jmp .end_f |
;¥á«¨ ®£ ¢ë室 ï |
.output_leg: |
inc edx ;®¬¥à æ¨ï ®£ ç¨ ¥âáï á ã«ï, ¯®â®¬ã ¤®¡ ¢«ï¥¬ 1 |
movzx ecx,byte[esi+el_offs_box_x] |
add ecx,2 |
stdcall move_rotate_x_n90, ecx,edi |
add esi,el_offs_legs_out |
@@: |
movzx ecx,byte[esi] |
cmp ecx,0 |
je .not_found ;®£¨ ª®ç¨«¨áì à ìè¥, 祬 ®¦¨¤ «®áì |
stdcall move_rotate_n90, 0,ecx,edi |
inc esi |
dec edx |
jnz @b |
jmp .end_f |
.not_found: |
xor eax,eax |
xor ebx,ebx |
.end_f: |
ret |
endp |
align 4 |
proc move_rotate_n90 uses ecx edi, d_x:dword, d_y:dword, angle:dword |
mov edi,[angle] ;㣮« ¯®¢®à®â / 90 (®â 0-3) |
and edi,3 |
shl edi,4 ;edi*=16 |
add edi,mcs |
mov ecx,[d_x] |
imul ecx,dword[edi] |
add eax,ecx |
mov ecx,[d_y] |
imul ecx,dword[edi+4] |
add eax,ecx |
mov ecx,[d_x] |
imul ecx,dword[edi+8] |
add ebx,ecx |
mov ecx,[d_y] |
imul ecx,dword[edi+12] |
add ebx,ecx |
ret |
endp |
align 4 |
proc mem_copy, destination:dword, source:dword, len:dword |
push ecx esi edi |
cld |
mov esi, dword[source] |
mov edi, dword[destination] |
mov ecx, dword[len] |
rep movsb |
pop edi esi ecx |
ret |
endp |
;description: |
; ãªæ¨ï ¯à®¯ã᪠¥â ®¤® á«®¢® (¨«¨ ç¨á«®) á ãç¥â®¬ à §¤¥«¨â¥«ìëå ᨬ¢®«®¢: |
; ¯à®¡¥« , â ¡ã«ï樨, ®¢®© áâப¨. 㦠¤«ï ¯®á«¥¤®¢ ⥫쮣® áç¨âë¢ ¨ ç¨á¥« ¨§ áâப¨ |
;input: |
; edi - 㪠§ â¥«ì ¯à®¡¥« ¨«¨ á«®¢® |
;output: |
; edi - 㪠§ ⥫ì á«¥¤ãî饥 á«®¢® |
align 4 |
str_next_val: |
call str_skip_spaces |
@@: |
cmp byte[edi],0 |
je @f |
cmp byte[edi],' ' |
je @f |
cmp byte[edi],9 |
je @f |
cmp byte[edi],10 |
je @f |
cmp byte[edi],13 |
je @f |
inc edi |
jmp @b |
@@: |
call str_skip_spaces |
ret |
align 4 |
str_skip_spaces: |
dec edi |
@@: |
inc edi |
cmp byte[edi],' ' |
je @b |
cmp byte[edi],9 |
je @b |
cmp byte[edi],10 |
je @b |
cmp byte[edi],13 |
je @b |
ret |
align 4 |
str_next_spaces: |
dec edi |
@@: |
inc edi |
cmp byte[edi],0 |
je @f |
cmp byte[edi],' ' |
je @f |
cmp byte[edi],9 |
je @f |
cmp byte[edi],10 |
je @f |
cmp byte[edi],13 |
je @f |
jmp @b |
@@: |
ret |
;input: |
; esi - 㪠§ â¥«ì ¨áª®¬®¥ á«®¢® |
;output: |
; edi - 㪠§ â¥«ì ¯®§¨æ¨î ¢ ª®â®à®© á«®¢® ©¤¥®, ¥á«¨ á«®¢® ¥ ©¤¥® â® edi=0 |
;¯®àâïâáï ॣ¨áâàë: |
; eax ecx |
align 4 |
str_analiz_r: |
mov edi,open_file_lif |
mov ecx,dword[f_size] |
@@: |
mov al,byte[esi] ;ãáâ ¢«¨¢ ¥¬ ¯¥à¢ë© ᨬ¢®« ¤«ï ¯®¨áª |
cld |
repnz scasb |
cmp ecx,0 |
je @f ;¥á«¨ § ª®ç¨«áï ¢¥áì ⥪áâ, â® ¢ë室 ¨§ äãªæ¨¨ |
;¯¥à¢ë© ᨬ¢®« ¯® ¤à¥áã edi-1 ¤®«¦¥ ¡ëâì ¨§ áâப¨ esi |
dec edi |
stdcall str_instr, edi,esi ;¯à®¢¥à塞 á«®¢® ᮢ¯ ¤¥¨¥ |
inc edi |
cmp al,0 |
jne @b ;¥á«¨ á«®¢® ¥ ᮢ¯ «®, ¨é¥¬ ¢ áâப¥ á«¥¤ãî騩 ¯¥à¢ë© ᨬ¢®« ¤«ï áà ¢¥¨ï |
;áî¤ ¯®¯ ¤ ¥¬ ¥á«¨ 諨 á«®¢® esi ¯® ¤à¥áã edi |
jmp .exit_f |
@@: |
;áî¤ ¯®¯ ¤ ¥¬ ¥á«¨ ¥ 諨 á«®¢® esi ¯® ¤à¥áã edi |
xor edi,edi |
.exit_f: |
ret |
;description: |
; ¯à®¢¥àï¥â ᮤ¥à¦¨âáï «¨ áâப str1 ¢ áâப¥ str0 |
; ¯à®¢¥àª ¤¥« ¥âáï ⮫쪮 ç¨ ï á ¯¥à¢ëå ᨬ¢®«®¢, 㪠§ ëå ¢ str0 ¨ str1 |
; ¯à¨¬¥à 1: ¥á«¨ str0='aaabbbccc', str1='bbb' ᮢ¯ ¤¥¨ï ¥ ¡ã¤¥â |
; ¯à¨¬¥à 2: ¥á«¨ str0='aaabbbccc', str1='aaa' ᮢ¯ ¤¥¨¥ ¡ã¤¥â |
;output: |
; al = 0 ¥á«¨ áâப str1 ᮤ¥à¦¨âáï ¢ str0 |
; al != 0 ¥á«¨ áâப str1 ¥ ᮤ¥à¦¨âáï ¢ str0 |
align 4 |
proc str_instr uses edi esi, str0:dword, str1:dword |
;xor eax,eax |
mov edi,[str0] |
mov esi,[str1] |
cld |
@@: |
mov al,[esi] |
cmp al,0 |
je .e1 |
inc esi |
scasb ;áà ¢¨¢ ¥¬ ᨬ¢®«ë |
jz @b ;¥á«¨ ᮢ¯ «¨, â® ¯¥à¥å®¤¨¬ ª áà ¢¥¨î á«¥¤ãîé¨å |
;áî¤ ¯®¯ ¤ ¥¬ ¥á«¨ áâப¨ ¥ ᮢ¯ «¨ |
sub al,[edi-1] |
.e1: ;áî¤ ¯®¯ ¤ ¥¬ ¥á«¨ áâப str1 (esi) § ª®ç¨« áì |
ret |
endp |
align 4 |
proc but_run_stop |
xor byte[tim_ch],1 |
cmp byte[tim_ch],0 |
jne @f |
;®áâ ®¢ª á奬ë |
stdcall pole_reset_cells, pole ;ç¨á⪠¯à®¢®¤®¢ |
call redraw_pole |
jmp .end_f |
@@: |
;¯®¤£®â®¢ª áå¥¬ë ª § ¯ãáªã |
call sign_clear |
.end_f: |
ret |
endp |
align 4 |
proc but_set_0 uses eax |
stdcall [tl_node_get_data], tree1 |
pop eax |
test eax,eax |
jz .end_f |
;el_icon_captions |
; cmp byte[eax+8],'n' |
; je .end_f |
cmp byte[eax+8],'o' ;¢à¥¬¥®¥ ®âá¥ç¥¨¥, ¯®ª ¥â ¯à®¢¥àª¨ ⨯ ⥪ã饩 ¨ª®ª¨ |
jne .end_f |
mov byte[eax+8],'z' |
.end_f: |
ret |
endp |
align 4 |
proc but_set_1 uses eax |
stdcall [tl_node_get_data], tree1 |
pop eax |
test eax,eax |
jz .end_f |
;el_icon_captions |
; cmp byte[eax+8],'n' |
; je .end_f |
cmp byte[eax+8],'z' ;¢à¥¬¥®¥ ®âá¥ç¥¨¥, ¯®ª ¥â ¯à®¢¥àª¨ ⨯ ⥪ã饩 ¨ª®ª¨ |
jne .end_f |
mov byte[eax+8],'o' |
.end_f: |
ret |
endp |
;ᤢ¨£ ®¡ê¥ªâ ¢«¥¢® |
align 4 |
proc but_mov_l uses eax edi |
cmp byte[tim_ch],0 |
jne .end_f |
stdcall [tl_node_get_data], tree1 |
pop eax |
test eax,eax |
jz .end_f |
cmp dword[eax],1 |
jle .end_f |
dec dword[eax] |
mov edi,eax |
stdcall mem_copy,txt_buf,eax,capt_offs |
add edi,capt_offs |
call str_next_val |
call str_next_val |
stdcall make_list_capts,txt_buf,edi |
stdcall mem_copy,eax,txt_buf,32 ;capt_offs |
call redraw_pole |
stdcall [tl_draw],tree1 |
.end_f: |
ret |
endp |
;ᤢ¨£ ®¡ê¥ªâ ¢¯à ¢® |
align 4 |
proc but_mov_r uses eax edi |
cmp byte[tim_ch],0 |
jne .end_f |
stdcall [tl_node_get_data], tree1 |
pop eax |
test eax,eax |
jz .end_f |
inc dword[eax] |
mov edi,eax |
stdcall mem_copy,txt_buf,eax,capt_offs |
add edi,capt_offs |
call str_next_val |
call str_next_val |
stdcall make_list_capts,txt_buf,edi |
stdcall mem_copy,eax,txt_buf,32 ;capt_offs |
call redraw_pole |
stdcall [tl_draw],tree1 |
.end_f: |
ret |
endp |
align 4 |
proc but_mov_u uses eax edi |
cmp byte[tim_ch],0 |
jne .end_f |
stdcall [tl_node_get_data], tree1 |
pop eax |
test eax,eax |
jz .end_f |
cmp dword[eax+4],1 |
jle .end_f |
dec dword[eax+4] |
mov edi,eax |
stdcall mem_copy,txt_buf,eax,capt_offs |
add edi,capt_offs |
call str_next_val |
call str_next_val |
stdcall make_list_capts,txt_buf,edi |
stdcall mem_copy,eax,txt_buf,32 ;capt_offs |
call redraw_pole |
stdcall [tl_draw],tree1 |
.end_f: |
ret |
endp |
align 4 |
proc but_mov_d uses eax edi |
cmp byte[tim_ch],0 |
jne .end_f |
stdcall [tl_node_get_data], tree1 |
pop eax |
test eax,eax |
jz .end_f |
inc dword[eax+4] |
mov edi,eax |
stdcall mem_copy,txt_buf,eax,capt_offs |
add edi,capt_offs |
call str_next_val |
call str_next_val |
stdcall make_list_capts,txt_buf,edi |
stdcall mem_copy,eax,txt_buf,32 ;capt_offs |
call redraw_pole |
stdcall [tl_draw],tree1 |
.end_f: |
ret |
endp |
;ãáâ ®¢ª ®¡ë箣® ०¨¬ , ¡¥§ à¨á®¢ ¨ï |
align 4 |
proc but_set_none |
mov byte[pen_mode],0 |
ret |
endp |
;ãáâ ®¢ª ०¨¬ à¨á®¢ ¨ï ¯à®¢®¤ |
align 4 |
proc but_set_pen_1 |
mov byte[pen_mode],1 |
ret |
endp |
; |
align 4 |
proc but_set_pen_2 |
mov byte[pen_mode],2 |
ret |
endp |
;ãáâ ®¢ª ०¨¬ áâ¨à ¨ï ¯à®¢®¤ |
align 4 |
proc but_set_pen_3 |
mov byte[pen_mode],3 |
ret |
endp |
;¤ ë¥ ¤«ï ¤¨ «®£ ®âªàëâ¨ï ä ©«®¢ |
align 4 |
OpenDialog_data: |
.type dd 0 ;0 - ®âªàëâì, 1 - á®åà ¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î |
.procinfo dd procinfo ;+4 |
.com_area_name dd communication_area_name ;+8 |
.com_area dd 0 ;+12 |
.opendir_path dd plugin_path ;+16 |
.dir_default_path dd default_dir ;+20 |
.start_path dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢ |
.draw_window dd draw_window ;+28 |
.status dd 0 ;+32 |
.openfile_path dd openfile_path ;+36 ¯ãâì ª ®âªàë¢ ¥¬®¬ã ä ©«ã |
.filename_area dd filename_area ;+40 |
.filter_area dd Filter |
.x: |
.x_size dw 420 ;+48 ; Window X size |
.x_start dw 10 ;+50 ; Window X position |
.y: |
.y_size dw 320 ;+52 ; Window y size |
.y_start dw 10 ;+54 ; Window Y position |
default_dir db '/rd/1',0 |
communication_area_name: |
db 'FFFFFFFF_open_dialog',0 |
open_dialog_name: |
db 'opendial',0 |
communication_area_default_path: |
db '/rd/1/File managers/',0 |
Filter: |
dd Filter.end - Filter ;.1 |
.1: |
db 'TXT',0 |
db 'ASM',0 |
.end: |
db 0 |
include 'le_libs.inc' |
mouse_dd dd 0x0 |
sc system_colors |
last_time dd 0 |
align 16 |
procinfo process_information |
align 4 |
buf_0: dd 0 ; |
.l: dw 170 ;+4 left |
.t: dw panel_1_coord_top ;+6 top |
.w: dd 335 ;+8 w |
.h: dd 340 ;+12 h |
.color: dd 0 ;+16 color |
db 24 ;+20 bit in pixel |
align 4 |
buf_font: ;¡ãä¥à á® èà¨ä⮬ |
dd 0 ;㪠§ â¥«ì ¡ãä¥à ¨§®¡à ¦¥¨ï |
dw 25 ;+4 left |
dw 25 ;+6 top |
dd 96 ;+8 w |
dd 144 ;+12 h |
dd 0 ;+16 color |
db 24 ;+20 bit in pixel |
el_focus dd 0 |
tree1 tree_list 32,points_max+2, tl_key_no_edit, 16,16,\ |
0x8080ff,0x0000ff,0xffffff, 5,panel_3_coord_top,145,250, 0,capt_offs,0,\ |
el_focus, wScrObj,0 |
align 4 |
wScrObj: |
.x: |
.size_x dw 16 ;+0 |
.start_x dw 0 ;+2 |
.y: |
.size_y dw 150 ;+4 |
.start_y dw 0 ;+6 |
.btn_high dd 15 ;+8 |
.type dd 1 ;+12 |
.max_area dd 100 ;+16 |
.cur_area dd 30 ;+20 |
.position dd 0 ;+24 |
.bckg_col dd 0xeeeeee ;+28 |
.frnt_col dd 0xbbddff ;+32 |
.line_col dd 0 ;+36 |
.redraw dd 0 ;+40 |
.delta dw 0 ;+44 |
.delta2 dw 0 ;+46 |
.run_x: |
.r_size_x dw 0 ;+48 |
.r_start_x dw 0 ;+50 |
.run_y: |
.r_size_y dw 0 ;+52 |
.r_start_y dw 0 ;+54 |
.m_pos dd 0 ;+56 |
.m_pos_2 dd 0 ;+60 |
.m_keys dd 0 ;+64 |
.run_size dd 0 ;+68 |
.position2 dd 0 ;+72 |
.work_size dd 0 ;+76 |
.all_redraw dd 0 ;+80 |
.ar_offset dd 1 ;+84 |
align 4 |
proc str_n_cat uses eax ecx edi esi, str1:dword, str2:dword, n:dword |
mov esi,dword[str2] |
mov ecx,dword[n] |
mov edi,dword[str1] |
stdcall str_len,edi |
add edi,eax |
cld |
repne movsb |
mov byte[edi],0 |
ret |
endp |
align 4 |
proc str_cat uses eax ecx edi esi, str1:dword, str2:dword |
mov esi,dword[str2] |
stdcall str_len,esi |
mov ecx,eax |
inc ecx |
mov edi,dword[str1] |
stdcall str_len,edi |
add edi,eax |
cld |
repne movsb |
ret |
endp |
;output: |
; eax = strlen |
align 4 |
proc str_len, str1:dword |
mov eax,[str1] |
@@: |
cmp byte[eax],0 |
je @f |
inc eax |
jmp @b |
@@: |
sub eax,[str1] |
ret |
endp |
;input: |
; buf - 㪠§ ⥫ì áâபã, ç¨á«® ¤®«¦® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç®¬ ¢¨¤¥ |
;output: |
; eax - ç¨á«® |
align 4 |
proc conv_str_to_int, buf:dword |
xor eax,eax |
push ebx ecx esi |
xor ebx,ebx |
mov esi,[buf] |
; á«ãç © ¥á«¨ ¯¥à¥¤ ç¨á«®¬ 室ïâáï ¯à®¡¥«ë |
@@: |
cmp byte[esi],' ' |
jne @f |
inc esi |
jmp @b |
@@: |
;®¯à¥¤¥«¥¨¥ ®âà¨æ ⥫ìëå ç¨á¥« |
xor ecx,ecx |
inc ecx |
cmp byte[esi],'-' |
jne @f |
dec ecx |
inc esi |
@@: |
cmp word[esi],'0x' |
je .load_digit_16 |
.load_digit_10: ;áç¨âë¢ ¨¥ 10-â¨çëå æ¨äà |
mov bl,byte[esi] |
cmp bl,'0' |
jl @f |
cmp bl,'9' |
jg @f |
sub bl,'0' |
imul eax,10 |
add eax,ebx |
inc esi |
jmp .load_digit_10 |
jmp @f |
.load_digit_16: ;áç¨âë¢ ¨¥ 16-à¨çëå æ¨äà |
add esi,2 |
.cycle_16: |
mov bl,byte[esi] |
cmp bl,'0' |
jl @f |
cmp bl,'f' |
jg @f |
cmp bl,'9' |
jle .us1 |
cmp bl,'A' |
jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'9' ¨ <'A' |
.us1: ;á®áâ ¢®¥ ãá«®¢¨¥ |
cmp bl,'F' |
jle .us2 |
cmp bl,'a' |
jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'F' ¨ <'a' |
sub bl,32 ;¯¥à¥¢®¤¨¬ ᨬ¢®«ë ¢ ¢¥à娩 ॣ¨áâà, ¤«ï ã¯à®é¥¨ï ¨å ¯®á«¥¤ã饩 ®¡à ¡®âª¨ |
.us2: ;á®áâ ¢®¥ ãá«®¢¨¥ |
sub bl,'0' |
cmp bl,9 |
jle .cor1 |
sub bl,7 ;convert 'A' to '10' |
.cor1: |
shl eax,4 |
add eax,ebx |
inc esi |
jmp .cycle_16 |
@@: |
cmp ecx,0 ;¥á«¨ ç¨á«® ®âà¨æ ⥫쮥 |
jne @f |
sub ecx,eax |
mov eax,ecx |
@@: |
pop esi ecx ebx |
ret |
endp |
;íâ®â ª®¤ ¥ ¬®©, ® ¯à¥®¡à §ã¥â ç¨á«® ¢ áâபã |
;input: |
; eax = value |
; edi = string buffer |
;output: |
align 4 |
convert_int_to_str: |
pushad |
mov dword[edi+1],0;0x20202020 |
call .str |
popad |
ret |
align 4 |
.str: |
mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬ áç¨á«¥¨ï ¨§¬¥ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤ë¥ ¯ à ¬¥âàë eax - ç¨á«® |
;¯à¥à¥¢®¤ ç¨á« ¢ ASCII áâப㠢§®¤ë¥ ¤ ë¥ ecx=á¨á⥬ áç¨á«¥ï edi ¤à¥á ªã¤ § ¯¨áë¢ âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®¥æ ¯¥à¥¬¥®© |
cmp eax,ecx ;áà ¢¨âì ¥á«¨ ¢ eax ¬¥ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ @@-1 â.¥. pop eax |
jb @f |
xor edx,edx ;®ç¨áâ¨âì edx |
div ecx ;à §¤¥«¨âì - ®áâ ⮪ ¢ edx |
push edx ;¯®«®¦¨âì ¢ á⥪ |
;dec edi ;ᬥ饨¥ ¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®æ áâப¨ |
call .str ;¯¥à¥©â¨ á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥â ¯®ª ¢ eax ¥ á⠥⠬¥ìè¥ ç¥¬ ¢ ecx |
pop eax |
@@: ;cmp al,10 ;¯à®¢¥à¨âì ¥ ¬¥ìè¥ «¨ § 票¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥ï 10 ¤ ï ª®¬ ¤ - «¨è ï)) |
or al,0x30 ;¤ ï ª®¬ ¤ ª®à®ç¥ 祬 ¤¢¥ ¢ëè¥ |
stosb ;§ ¯¨á âì í«¥¬¥â ¨§ ॣ¨áâà al ¢ ï祪㠯 ¬ï⨠es:edi |
ret ;¢¥àãâìáï ç¥ì ¨â¥à¥áë© å®¤ â.ª. ¯®ª ¢ á⥪¥ åà ¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï |
i_end: |
rb 1024 |
stacktop: |
sys_path rb 1024 |
file_name: |
rb 1024 ;4096 |
library_path rb 1024 |
plugin_path rb 4096 |
openfile_path rb 4096 |
filename_area rb 256 |
mem: |
/programs/media/log_el/trunk/mem.inc |
---|
0,0 → 1,48 |
;----------------------------------------------------------------------------- |
proc mem.Alloc,size ;///////////////////////////////////////////////////////// |
;----------------------------------------------------------------------------- |
push ebx ecx |
mov ecx,[size] |
;*** add ecx,4 |
mcall 68,12 |
;*** add ecx,-4 |
;*** mov [eax],ecx |
;*** add eax,4 |
pop ecx ebx |
ret |
endp |
;----------------------------------------------------------------------------- |
proc mem.ReAlloc,mptr,size ;////////////////////////////////////////////////// |
;----------------------------------------------------------------------------- |
push ebx ecx edx |
mov ecx,[size] |
or ecx,ecx |
jz @f |
;*** add ecx,4 |
@@: mov edx,[mptr] |
or edx,edx |
jz @f |
;*** add edx,-4 |
@@: mcall 68,20 |
or eax,eax |
jz @f |
;*** add ecx,-4 |
;*** mov [eax],ecx |
;*** add eax,4 |
@@: pop edx ecx ebx |
ret |
endp |
;----------------------------------------------------------------------------- |
proc mem.Free,mptr ;////////////////////////////////////////////////////////// |
;----------------------------------------------------------------------------- |
push ebx ecx |
mov ecx,[mptr] |
or ecx,ecx |
jz @f |
;*** add ecx,-4 |
@@: mcall 68,13 |
pop ecx ebx |
ret |
endp |
/programs/media/log_el/trunk/mn_4bit.txt |
---|
0,0 → 1,101 |
size 204 192 |
elements 36 |
111 44 3 sm[1] |
123 44 3 sm[1] |
135 44 3 sm[1] |
147 44 3 sm[1] |
159 44 3 sm[1] |
80 35 0 and[2] |
67 35 0 and[2] |
54 35 0 and[2] |
123 71 3 sm[1] |
135 71 3 sm[1] |
147 71 3 sm[1] |
159 71 3 sm[1] |
135 98 3 sm[1] |
147 98 3 sm[1] |
159 98 3 sm[1] |
183 98 3 sm[1] |
147 125 3 sm[1] |
159 125 3 sm[1] |
183 125 3 sm[1] |
195 125 3 sm[1] |
41 62 0 and[2] |
54 62 0 and[2] |
67 62 0 and[2] |
80 62 0 and[2] |
41 89 0 and[2] |
54 89 0 and[2] |
67 89 0 and[2] |
80 89 0 and[2] |
41 116 0 and[2] |
54 116 0 and[2] |
67 116 0 and[2] |
80 116 0 and[2] |
41 35 0 and[2] |
171 71 3 sm[1] |
171 98 3 sm[1] |
171 125 3 sm[1] |
captions 10 |
76 9 z a0 |
63 9 z a1 |
50 9 z a2 |
37 9 z a3 |
11 122 z b0 |
11 95 z b1 |
11 68 z b2 |
11 41 z b3 |
190 183 n c0 |
106 183 n c7 |
points 167 |
190 183 8 37 117 9 106 183 8 37 60 10 115 39 6 108 39 3 |
106 13 2 173 135 9 50 117 9 132 93 3 178 13 2 63 117 9 |
139 135 9 158 122 3 161 108 9 170 95 3 122 68 3 185 135 9 |
76 117 9 149 108 9 142 13 2 78 122 12 146 95 3 52 122 13 |
154 53 2 115 81 9 178 183 8 166 13 2 78 95 12 190 13 2 |
182 108 12 78 68 12 194 135 12 182 135 12 142 53 2 130 53 2 |
170 81 12 161 135 9 78 41 12 125 81 9 130 13 2 76 36 11 |
63 36 11 50 36 11 37 33 10 134 68 3 50 63 11 134 95 3 |
63 63 11 161 122 6 76 63 11 166 183 8 149 135 9 76 90 11 |
63 90 11 50 90 11 37 87 10 39 41 13 39 68 13 39 95 13 |
39 122 13 173 95 6 52 95 13 182 122 3 52 68 13 142 183 8 |
52 41 13 118 183 8 122 81 12 65 41 13 65 68 13 65 95 13 |
65 122 13 192 118 6 137 68 6 139 93 6 180 114 6 74 114 3 |
130 80 2 149 81 9 158 95 3 118 53 2 61 112 3 168 112 6 |
173 108 9 170 108 12 156 110 6 48 110 3 142 107 2 149 122 6 |
173 122 6 37 36 1 48 83 3 144 83 6 146 68 3 127 108 9 |
156 85 6 61 85 3 142 80 2 146 135 12 185 122 6 154 80 2 |
74 87 3 168 87 6 154 13 2 137 95 6 180 91 6 146 122 3 |
170 122 3 168 64 6 149 95 6 137 108 9 156 60 6 74 60 3 |
178 107 2 170 135 12 130 183 8 166 80 2 61 58 3 144 58 6 |
134 108 12 158 108 12 132 56 6 48 56 3 37 63 1 127 66 6 |
158 135 12 37 90 1 48 29 3 120 29 6 161 68 6 134 81 12 |
132 31 6 61 31 3 154 107 2 161 81 9 161 95 6 166 107 2 |
74 33 3 144 33 6 137 81 9 149 68 6 156 37 6 118 13 2 |
158 81 12 158 54 12 149 54 9 149 41 6 146 41 3 146 81 12 |
154 183 8 146 54 12 137 54 9 137 41 6 134 41 3 120 66 3 |
146 108 12 134 54 12 125 54 9 125 41 6 122 41 3 158 68 3 |
125 68 6 122 54 12 113 54 9 113 41 6 110 41 3 |
subpoints 174 |
76 41 63 41 50 41 37 41 144 37 76 33 132 37 132 33 |
76 31 63 31 120 37 120 33 120 31 76 29 63 29 50 29 |
118 81 166 64 154 64 142 64 130 64 118 64 115 64 106 64 |
76 60 106 60 115 60 118 60 37 68 50 68 63 68 76 68 |
142 108 37 95 50 95 154 108 166 108 178 108 106 118 118 118 |
130 118 63 95 76 95 106 91 118 91 178 91 166 91 154 91 |
142 91 130 91 106 87 118 87 130 87 142 87 142 118 154 118 |
166 118 178 118 154 87 166 87 168 91 63 85 130 60 142 60 |
154 60 156 64 63 58 76 58 106 58 118 58 76 85 106 85 |
118 85 130 85 190 118 180 118 178 114 166 114 142 85 154 85 |
156 87 156 91 50 83 63 83 76 83 115 58 130 58 142 58 |
144 60 144 64 50 56 63 56 106 83 118 83 130 83 142 83 |
154 114 144 85 144 87 144 91 142 114 130 114 118 114 130 108 |
127 91 76 56 106 56 127 87 106 114 76 114 127 85 63 112 |
76 112 106 112 118 112 130 112 142 112 127 83 127 81 115 56 |
118 56 166 81 154 81 130 54 142 54 154 54 118 54 115 54 |
130 56 132 58 132 60 132 64 142 81 130 81 154 112 106 29 |
106 31 106 33 106 37 118 37 118 33 118 31 118 29 130 31 |
130 33 130 37 142 37 142 33 154 37 166 112 168 114 168 118 |
156 118 156 114 156 112 154 110 142 110 130 110 118 110 106 110 |
76 110 63 110 50 110 142 135 139 118 139 114 139 112 139 110 |
139 108 154 135 166 135 178 135 190 135 76 87 |
/programs/media/log_el/trunk/objects.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/log_el/trunk/or_2.txt |
---|
0,0 → 1,9 |
size 80 60 |
elements 1 |
24 24 0 or[2] |
captions 3 |
10 8 z x1 |
10 44 z x2 |
56 26 n y1 |
points 4 |
10 25 9 10 27 3 10 44 8 56 26 4 |
/programs/media/log_el/trunk/or_3.txt |
---|
0,0 → 1,10 |
size 80 60 |
elements 1 |
24 24 0 or[3] |
captions 4 |
10 8 z x1 |
10 44 z x2 |
30 44 z x3 |
56 27 n y1 |
points 5 |
10 25 9 10 27 3 10 44 8 56 27 4 22 44 9 |
/programs/media/log_el/trunk/test1.txt |
---|
0,0 → 1,40 |
size 80 80 |
elements 1 |
6 32 0 not |
points 171 |
28 52 2 50 75 8 29 52 2 30 52 2 31 52 2 32 52 2 |
33 52 2 34 52 2 35 52 2 36 52 2 37 52 2 38 52 2 |
39 52 2 40 52 2 41 52 2 42 52 2 43 52 2 44 52 2 |
45 52 2 46 52 2 47 52 2 48 52 2 49 52 2 50 52 2 |
51 52 2 51 75 8 49 75 8 48 75 8 47 75 8 46 75 8 |
45 75 8 44 75 8 43 75 8 42 75 8 41 75 8 40 75 8 |
39 75 8 38 75 8 37 75 8 36 75 8 35 75 8 34 75 8 |
33 75 8 32 75 8 31 75 8 30 75 8 29 75 8 28 75 8 |
37 65 8 37 69 2 38 69 2 39 69 2 40 69 2 41 69 2 |
38 65 8 39 65 8 40 65 8 41 65 8 52 75 8 53 75 8 |
54 75 8 55 75 8 56 75 8 57 75 8 58 75 8 59 75 8 |
51 49 8 50 49 8 49 49 8 48 49 8 47 49 8 46 49 8 |
45 49 8 44 49 8 43 49 8 42 49 8 41 49 8 40 49 8 |
39 49 8 38 49 8 37 49 8 36 49 8 35 49 8 34 49 8 |
33 49 8 32 49 8 31 49 8 30 49 8 29 49 8 28 49 8 |
28 4 2 29 4 2 30 4 2 31 4 2 32 4 2 33 4 2 |
34 4 2 35 4 2 36 4 2 37 4 2 38 4 2 39 4 2 |
40 4 2 41 4 2 42 4 2 43 4 2 44 4 2 45 4 2 |
46 4 2 47 4 2 48 4 2 49 4 2 50 4 2 51 4 2 |
52 4 2 53 4 2 54 4 2 55 4 2 56 4 2 57 4 2 |
58 4 2 59 4 2 60 4 2 61 4 2 62 4 2 63 4 2 |
64 4 2 65 4 2 66 4 2 67 4 2 68 4 2 69 4 2 |
70 4 2 71 4 2 72 4 2 73 4 2 74 4 2 75 4 2 |
60 75 8 61 75 8 62 75 8 63 75 8 64 75 8 65 75 8 |
66 75 8 67 75 8 68 75 8 69 75 8 70 75 8 71 75 8 |
72 75 8 73 75 8 74 75 8 75 75 8 11 30 3 4 30 3 |
27 30 4 39 14 8 39 17 2 40 17 2 41 17 2 42 17 2 |
43 17 2 44 17 2 45 17 2 45 14 8 44 14 8 43 14 8 |
42 14 8 41 14 8 40 14 8 |
subpoints 41 |
58 34 58 36 58 38 58 40 58 42 58 44 58 46 58 48 |
58 50 58 52 58 54 58 56 58 58 58 60 56 60 54 60 |
52 60 50 60 48 60 46 60 44 60 42 60 40 60 38 60 |
36 60 58 32 58 30 56 30 54 30 52 30 50 30 48 30 |
46 30 44 30 42 30 40 30 38 30 36 30 34 30 32 30 |
30 30 |
/programs/media/log_el/trunk/test2.txt |
---|
0,0 → 1,19 |
size 250 200 |
elements 1 |
126 97 0 not |
points 86 |
131 95 6 124 95 6 122 95 2 122 101 1 120 103 9 118 105 9 |
116 107 9 114 109 9 112 111 9 110 113 9 108 115 9 106 117 9 |
104 119 9 102 121 9 100 123 9 98 125 9 96 127 9 94 129 9 |
92 131 9 90 133 9 88 135 9 86 137 9 84 139 9 82 141 9 |
133 101 12 135 103 12 137 105 12 139 107 12 141 109 12 143 111 12 |
145 113 12 147 115 12 149 117 12 151 119 12 153 121 12 155 123 12 |
157 125 12 159 127 12 161 129 12 163 131 12 165 133 12 167 135 12 |
169 137 12 171 139 12 173 141 12 133 93 6 135 91 6 137 89 6 |
139 87 6 141 85 6 143 83 6 145 81 6 147 79 6 149 77 6 |
151 75 6 153 73 6 155 71 6 157 69 6 159 67 6 161 65 6 |
163 63 6 165 61 6 167 59 6 169 57 6 171 55 6 173 53 6 |
120 93 3 118 91 3 116 89 3 114 87 3 112 85 3 110 83 3 |
108 81 3 106 79 3 104 77 3 102 75 3 100 73 3 98 71 3 |
96 69 3 94 67 3 92 65 3 90 63 3 88 61 3 86 59 3 |
84 57 3 82 55 3 |
/programs/media/log_el/trunk/test3.txt |
---|
0,0 → 1,20 |
size 300 200 |
elements 1 |
126 97 0 not |
points 95 |
131 95 6 124 95 6 122 95 2 122 101 1 120 103 9 118 105 9 |
116 107 9 114 109 9 112 111 9 110 113 9 108 115 9 106 117 9 |
104 119 9 102 121 9 100 123 9 98 125 9 96 127 9 94 129 9 |
92 131 9 90 133 9 88 135 9 86 137 9 84 139 9 82 141 9 |
133 101 12 135 103 12 137 105 12 139 107 12 141 109 12 143 111 12 |
145 113 12 147 115 12 149 117 12 151 119 12 153 121 12 155 123 12 |
157 125 12 159 127 12 161 129 12 163 131 12 165 133 12 167 135 12 |
169 137 12 171 139 12 173 141 12 133 93 6 135 91 6 137 89 6 |
139 87 6 141 85 6 143 83 6 145 81 6 147 79 6 149 77 6 |
151 75 6 153 73 6 155 71 6 157 69 6 159 67 6 161 65 6 |
163 63 6 165 61 6 167 59 6 169 57 6 171 55 6 173 53 6 |
120 93 3 118 91 3 116 89 3 114 87 3 112 85 3 110 83 3 |
108 81 3 106 79 3 104 77 3 102 75 3 100 73 3 98 71 3 |
96 69 3 94 67 3 92 65 3 90 63 3 88 61 3 86 59 3 |
84 57 3 82 55 3 127 101 2 127 95 12 122 98 6 131 98 1 |
80 53 0 127 51 0 175 98 0 127 143 0 80 98 0 |
/programs/media/log_el/trunk/test4.txt |
---|
0,0 → 1,33 |
size 104 80 |
captions 1 |
7 30 o A |
points 169 |
52 52 2 74 75 8 53 52 2 54 52 2 55 52 2 56 52 2 |
57 52 2 58 52 2 59 52 2 60 52 2 61 52 2 62 52 2 |
63 52 2 64 52 2 65 52 2 66 52 2 67 52 2 68 52 2 |
69 52 2 70 52 2 71 52 2 72 52 2 73 52 2 74 52 2 |
75 52 2 75 75 8 73 75 8 72 75 8 71 75 8 70 75 8 |
69 75 8 68 75 8 67 75 8 66 75 8 65 75 8 64 75 8 |
63 75 8 62 75 8 61 75 8 60 75 8 59 75 8 58 75 8 |
57 75 8 56 75 8 55 75 8 54 75 8 53 75 8 52 75 8 |
61 65 8 61 69 2 62 69 2 63 69 2 64 69 2 65 69 2 |
62 65 8 63 65 8 64 65 8 65 65 8 76 75 8 77 75 8 |
78 75 8 79 75 8 80 75 8 81 75 8 82 75 8 83 75 8 |
75 49 8 74 49 8 73 49 8 72 49 8 71 49 8 70 49 8 |
69 49 8 68 49 8 67 49 8 66 49 8 65 49 8 64 49 8 |
63 49 8 62 49 8 61 49 8 60 49 8 59 49 8 58 49 8 |
57 49 8 56 49 8 55 49 8 54 49 8 53 49 8 52 49 8 |
52 4 2 53 4 2 54 4 2 55 4 2 56 4 2 57 4 2 |
58 4 2 59 4 2 60 4 2 61 4 2 62 4 2 63 4 2 |
64 4 2 65 4 2 66 4 2 67 4 2 68 4 2 69 4 2 |
70 4 2 71 4 2 72 4 2 73 4 2 74 4 2 75 4 2 |
76 4 2 77 4 2 78 4 2 79 4 2 80 4 2 81 4 2 |
82 4 2 83 4 2 84 4 2 85 4 2 86 4 2 87 4 2 |
88 4 2 89 4 2 90 4 2 91 4 2 92 4 2 93 4 2 |
94 4 2 95 4 2 96 4 2 97 4 2 98 4 2 99 4 2 |
84 75 8 85 75 8 86 75 8 87 75 8 88 75 8 89 75 8 |
90 75 8 91 75 8 92 75 8 93 75 8 94 75 8 95 75 8 |
96 75 8 97 75 8 98 75 8 99 75 8 64 14 8 65 14 8 |
51 30 4 63 14 8 63 17 2 64 17 2 65 17 2 66 17 2 |
67 17 2 68 17 2 69 17 2 69 14 8 68 14 8 67 14 8 |
66 14 8 |
/programs/media/log_el/trunk/test5.txt |
---|
0,0 → 1,21 |
size 300 200 |
elements 1 |
47 94 0 not |
points 102 |
52 92 7 45 92 2 117 92 8 275 34 2 273 32 2 274 33 2 |
272 31 2 276 35 2 277 36 2 278 37 2 124 13 1 123 14 1 |
122 15 1 121 16 1 120 17 1 119 18 1 118 19 1 117 20 1 |
116 21 1 115 22 1 114 23 1 113 24 1 112 25 1 111 26 1 |
110 27 1 109 28 1 108 29 1 107 30 1 106 31 1 105 32 1 |
104 33 1 103 34 1 102 35 1 101 36 1 100 37 1 99 38 1 |
98 39 1 97 40 1 96 41 1 279 38 2 282 41 2 281 40 2 |
283 42 2 280 39 2 284 43 2 288 47 2 287 46 2 286 45 2 |
285 44 2 271 30 2 270 29 2 269 28 2 268 27 2 267 26 2 |
266 25 2 265 24 2 264 23 2 263 22 2 262 21 2 261 20 2 |
260 19 2 259 18 2 258 17 2 257 16 2 256 15 2 255 14 2 |
254 13 2 254 155 4 255 154 4 256 153 4 257 152 4 258 151 4 |
259 150 4 260 149 4 261 148 4 262 147 4 263 146 4 264 145 4 |
265 144 4 266 143 4 267 142 4 268 141 4 269 140 4 270 139 4 |
271 138 4 272 137 4 273 136 4 274 135 4 275 134 4 276 133 4 |
277 132 4 278 131 4 279 130 4 280 129 4 281 128 4 282 127 4 |
283 126 4 284 125 4 285 124 4 286 123 4 287 122 4 288 121 4 |
/programs/media/log_el/trunk/tl_sys_16.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/log_el/trunk/toolbar.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/log_el/trunk/triger_dc.txt |
---|
0,0 → 1,20 |
size 124 28 |
elements 9 |
66 17 0 not |
66 6 0 not |
56 5 0 and[2] |
56 16 0 and[2] |
48 5 0 not |
48 18 0 not |
38 4 0 and[2] |
38 17 0 and[2] |
30 19 0 not |
captions 2 |
4 5 z D |
4 7 z C |
points 17 |
63 7 1 54 11 9 71 7 3 54 13 3 71 18 9 63 18 1 |
64 11 6 71 15 6 64 15 9 71 13 12 53 19 1 45 19 1 |
35 20 1 53 6 1 45 6 1 36 7 6 28 5 7 |
subpoints 2 |
64 13 28 7 |
/programs/media/log_el/trunk/triger_rs.txt |
---|
0,0 → 1,14 |
size 96 32 |
elements 4 |
28 5 0 or[2] |
38 6 0 not |
28 16 0 or[2] |
38 17 0 not |
captions 2 |
6 6 z R |
6 19 z S |
points 12 |
35 7 1 26 11 9 43 7 3 26 13 3 43 18 9 35 18 1 |
36 11 6 43 15 6 36 15 9 43 13 12 6 6 1 6 19 1 |
subpoints 1 |
36 13 |
/programs/media/log_el/trunk/triger_web.txt |
---|
0,0 → 1,26 |
size 80 64 |
elements 12 |
47 20 0 and[2] |
57 21 0 not |
47 32 0 and[2] |
57 33 0 not |
38 20 0 not |
38 34 0 not |
28 19 0 and[2] |
28 32 0 and[3] |
28 8 0 and[2] |
28 46 0 and[2] |
38 47 0 not |
38 9 0 not |
captions 2 |
4 35 z C |
4 49 z D |
points 36 |
62 22 3 62 34 9 54 22 1 45 26 9 54 26 2 62 28 4 |
45 28 2 54 30 1 62 30 2 54 34 1 43 21 11 43 35 3 |
35 21 1 35 35 1 26 30 3 43 15 6 24 35 13 35 10 1 |
35 48 1 26 15 9 43 40 12 26 17 3 35 17 8 35 13 1 |
43 13 8 24 22 1 22 9 1 22 52 9 43 42 2 26 44 3 |
35 44 8 26 42 9 35 40 1 43 52 8 43 30 12 4 49 1 |
subpoints 5 |
35 15 54 28 22 35 35 42 22 49 |
/programs/media/log_el/trunk |
---|
Property changes: |
Added: tsvn:logminsize |
+5 |
\ No newline at end of property |
/programs/media/log_el |
---|
Property changes: |
Added: tsvn:logminsize |
+5 |
\ No newline at end of property |