Rev 8219 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8219 | Rev 8346 | ||
---|---|---|---|
Line 5... | Line 5... | ||
5 | 5 | ||
6 | include '../../../macros.inc' |
6 | include '../../../macros.inc' |
7 | include '../../../proc32.inc' |
7 | include '../../../proc32.inc' |
8 | include '../../../KOSfuncs.inc' |
8 | include '../../../KOSfuncs.inc' |
9 | include '../../../load_img.inc' |
9 | include '../../../load_img.inc' |
Line 10... | Line 10... | ||
10 | include '../../../develop/libraries/box_lib/load_lib.mac' |
10 | include '../../../load_lib.mac' |
Line 11... | Line 11... | ||
11 | 11 | ||
12 | ;include 'lang.inc' |
12 | ;include 'lang.inc' |
Line 601... | Line 601... | ||
601 | jge .if_2_e |
601 | jge .if_2_e |
602 | lea edi,[eax*4] |
602 | lea edi,[eax*4] |
603 | add edi,[memCell] ;edi -> &memCell[fristC] |
603 | add edi,[memCell] ;edi -> &memCell[fristC] |
604 | mov esi,[edi] ;swp=memCell[fristC]; |
604 | mov esi,[edi] ;swp=memCell[fristC]; |
605 | mov edx,[ecx] ;edx - 㦥 ¥ ¨á¯®«ì§ã¥¬, ¯®â®¬ã ¬®¦¥¬ ¯®àâ¨âì |
605 | mov edx,[ecx] ;edx - 㦥 ¥ ¨á¯®«ì§ã¥¬, ¯®â®¬ã ¬®¦¥¬ ¯®àâ¨âì |
606 | mov dword[edi],edx ;memCell[fristC]=memCell[i]; |
606 | mov [edi],edx ;memCell[fristC]=memCell[i]; |
607 | mov dword[ecx],esi ;memCell[i]=swp; |
607 | mov [ecx],esi ;memCell[i]=swp; |
608 | dec eax |
608 | dec eax |
609 | dec ebx |
609 | dec ebx |
610 | sub ecx,4 |
610 | sub ecx,4 |
611 | .if_2_e: |
611 | .if_2_e: |
Line 612... | Line 612... | ||
612 | 612 | ||
613 | inc ebx |
613 | inc ebx |
614 | cmp ebx,eax |
614 | cmp ebx,eax |
615 | jle @b |
615 | jle @b |
616 | mov ebx,[memCell] |
616 | mov ebx,[memCell] |
Line 617... | Line 617... | ||
617 | mov dword[ebx],eax ;firstC <- eax |
617 | mov [ebx],eax ;firstC <- eax |
618 | 618 | ||
Line 619... | Line 619... | ||
619 | mov dword[b_sort],eax |
619 | mov [b_sort],eax |
620 | stdcall pole_fl_sort, dword[memCell],eax |
620 | stdcall pole_fl_sort, [memCell],eax |
621 | 621 | ||
622 | mov ecx,[memCell] |
622 | mov ecx,[memCell] |
623 | mov ebx,1 |
623 | mov ebx,1 |
624 | @@: ;for(i=1;i<=firstC;i++) |
624 | @@: ;for(i=1;i<=firstC;i++) |
625 | add ecx,4 |
625 | add ecx,4 |
626 | get_cell_offset edx,[ecx] |
626 | get_cell_offset edx,[ecx] |
627 | bt word[edx+Cell.liv],1 |
627 | bt word[edx+Cell.liv],1 |
628 | jae .no_change |
628 | jae .no_change |
629 | xor byte[edx+Cell.liv],3 |
629 | xor byte[edx+Cell.liv],3 |
630 | mov edi,[tim] |
630 | mov edi,[tim] |
631 | mov dword[edx+Cell.tc],edi |
631 | mov [edx+Cell.tc],edi |
632 | bt word[edx+Cell.liv],0 |
632 | bt word[edx+Cell.liv],0 |
633 | jc .new_cell |
633 | jc .new_cell |
Line 720... | Line 720... | ||
720 | ;®¬¥áâ¨âì ©¤¥ë© ¬ ªá¨¬ «ìë© í«¥¬¥â ¢ ª®¥æ ᯨ᪠|
720 | ;®¬¥áâ¨âì ©¤¥ë© ¬ ªá¨¬ «ìë© í«¥¬¥â ¢ ª®¥æ ᯨ᪠|
721 | lea edi,[eax*4] |
721 | lea edi,[eax*4] |
722 | add edi,ecx ;edi -> &a[i] |
722 | add edi,ecx ;edi -> &a[i] |
723 | mov esi,[edi] ;w=a[i]; |
723 | mov esi,[edi] ;w=a[i]; |
724 | mov edx,[ecx+4] |
724 | mov edx,[ecx+4] |
725 | mov dword[edi],edx ;a[i]=a[1]; |
725 | mov [edi],edx ;a[i]=a[1]; |
726 | mov dword[ecx+4],esi ;a[1]=w; |
726 | mov [ecx+4],esi ;a[1]=w; |
Line 727... | Line 727... | ||
727 | 727 | ||
728 | dec eax |
728 | dec eax |
729 | cmp eax,2 |
729 | cmp eax,2 |
730 | jge @b |
730 | jge @b |
Line 747... | Line 747... | ||
747 | mov ecx,[k] |
747 | mov ecx,[k] |
Line 748... | Line 748... | ||
748 | 748 | ||
749 | lea edx,[ebx*4] |
749 | lea edx,[ebx*4] |
750 | add edx,eax |
750 | add edx,eax |
751 | mov edx,[edx] |
751 | mov edx,[edx] |
752 | mov dword[copy],edx ;copy=a[i]; |
752 | mov [copy],edx ;copy=a[i]; |
753 | mov edi,ebx |
753 | mov edi,ebx |
754 | shl edi,1 ;m=i<<1; |
754 | shl edi,1 ;m=i<<1; |
755 | .cycle_b: ;while (m<=k) { |
755 | .cycle_b: ;while (m<=k) { |
756 | cmp edi,ecx |
756 | cmp edi,ecx |
Line 772... | Line 772... | ||
772 | .else_e: |
772 | .else_e: |
Line 773... | Line 773... | ||
773 | 773 | ||
774 | ;if (pole_compare_cells_bm(a[j],copy)) { |
774 | ;if (pole_compare_cells_bm(a[j],copy)) { |
775 | lea edx,[esi*4] |
775 | lea edx,[esi*4] |
776 | add edx,eax |
776 | add edx,eax |
777 | stdcall pole_compare_cells_bm, dword[edx],dword[copy] |
777 | stdcall pole_compare_cells_bm, dword[edx],[copy] |
778 | cmp dl,0 |
778 | cmp dl,0 |
Line 779... | Line 779... | ||
779 | je .cycle_e ;} else break; //¢ë室 ¨§ 横« |
779 | je .cycle_e ;} else break; //¢ë室 ¨§ 横« |
780 | 780 | ||
Line 793... | Line 793... | ||
793 | 793 | ||
794 | ;§ ç¥¨ï ¬®£¨å ॣ¨áâ஢ 㦥 ¥ ¢ ¦ë â. ª. ª®¥æ äãªæ¨¨ |
794 | ;§ ç¥¨ï ¬®£¨å ॣ¨áâ஢ 㦥 ¥ ¢ ¦ë â. ª. ª®¥æ äãªæ¨¨ |
795 | shl ebx,2 |
795 | shl ebx,2 |
796 | add eax,ebx |
796 | add eax,ebx |
797 | mov edx,[copy] |
797 | mov edx,[copy] |
Line 798... | Line 798... | ||
798 | mov dword[eax],edx ;a[i]=copy; |
798 | mov [eax],edx ;a[i]=copy; |
799 | 799 | ||
800 | popad |
800 | popad |
801 | ret |
801 | ret |
Line 1478... | Line 1478... | ||
1478 | cmp cx,2 |
1478 | cmp cx,2 |
1479 | jl @f ;¤¥«¥¨¥ ¢¥«¨ç¨ã zoom |
1479 | jl @f ;¤¥«¥¨¥ ¢¥«¨ç¨ã zoom |
1480 | xor edx,edx |
1480 | xor edx,edx |
1481 | div ecx |
1481 | div ecx |
1482 | @@: |
1482 | @@: |
1483 | add dword[Cor_y],eax |
1483 | add [Cor_y],eax |
1484 | pop edx ecx eax |
1484 | pop edx ecx eax |
1485 | stdcall [buf2d_clear], buf_0, [buf_0.color] |
1485 | stdcall [buf2d_clear], buf_0, [buf_0.color] |
1486 | call pole_paint |
1486 | call pole_paint |
1487 | stdcall [buf2d_draw], buf_0 |
1487 | stdcall [buf2d_draw], buf_0 |
1488 | ret |
1488 | ret |
Line 1497... | Line 1497... | ||
1497 | cmp cx,2 |
1497 | cmp cx,2 |
1498 | jl @f ;¤¥«¥¨¥ ¢¥«¨ç¨ã zoom |
1498 | jl @f ;¤¥«¥¨¥ ¢¥«¨ç¨ã zoom |
1499 | xor edx,edx |
1499 | xor edx,edx |
1500 | div ecx |
1500 | div ecx |
1501 | @@: |
1501 | @@: |
1502 | sub dword[Cor_y],eax |
1502 | sub [Cor_y],eax |
1503 | pop edx ecx eax |
1503 | pop edx ecx eax |
1504 | stdcall [buf2d_clear], buf_0, [buf_0.color] |
1504 | stdcall [buf2d_clear], buf_0, [buf_0.color] |
1505 | call pole_paint |
1505 | call pole_paint |
1506 | stdcall [buf2d_draw], buf_0 |
1506 | stdcall [buf2d_draw], buf_0 |
1507 | ret |
1507 | ret |
Line 1509... | Line 1509... | ||
1509 | align 4 |
1509 | align 4 |
1510 | but_pole_left: |
1510 | but_pole_left: |
1511 | push eax ecx edx |
1511 | push eax ecx edx |
1512 | mov eax,[buf_0.w] |
1512 | mov eax,[buf_0.w] |
1513 | shr eax,2 |
1513 | shr eax,2 |
1514 | xor ecx,ecx |
- | |
1515 | mov cl,byte[zoom] |
1514 | movzx ecx,byte[zoom] |
1516 | cmp cx,2 |
1515 | cmp ecx,2 |
1517 | jl @f ;¤¥«¥¨¥ ¢¥«¨ç¨ã zoom |
1516 | jl @f ;¤¥«¥¨¥ ¢¥«¨ç¨ã zoom |
1518 | xor edx,edx |
1517 | xor edx,edx |
1519 | div ecx |
1518 | div ecx |
1520 | @@: |
1519 | @@: |
1521 | add dword[Cor_x],eax |
1520 | add [Cor_x],eax |
1522 | pop edx ecx eax |
1521 | pop edx ecx eax |
1523 | stdcall [buf2d_clear], buf_0, [buf_0.color] |
1522 | stdcall [buf2d_clear], buf_0, [buf_0.color] |
1524 | call pole_paint |
1523 | call pole_paint |
1525 | stdcall [buf2d_draw], buf_0 |
1524 | stdcall [buf2d_draw], buf_0 |
1526 | ret |
1525 | ret |
Line 1535... | Line 1534... | ||
1535 | cmp cx,2 |
1534 | cmp cx,2 |
1536 | jl @f ;¤¥«¥¨¥ ¢¥«¨ç¨ã zoom |
1535 | jl @f ;¤¥«¥¨¥ ¢¥«¨ç¨ã zoom |
1537 | xor edx,edx |
1536 | xor edx,edx |
1538 | div ecx |
1537 | div ecx |
1539 | @@: |
1538 | @@: |
1540 | sub dword[Cor_x],eax |
1539 | sub [Cor_x],eax |
1541 | pop edx ecx eax |
1540 | pop edx ecx eax |
1542 | stdcall [buf2d_clear], buf_0, [buf_0.color] |
1541 | stdcall [buf2d_clear], buf_0, [buf_0.color] |
1543 | call pole_paint |
1542 | call pole_paint |
1544 | stdcall [buf2d_draw], buf_0 |
1543 | stdcall [buf2d_draw], buf_0 |
1545 | ret |
1544 | ret |
Line 1546... | Line -... | ||
1546 | - | ||
1547 | ;align 4 |
- | |
1548 | ;but_bru_clear: |
- | |
1549 | ; ret |
- | |
1550 | 1545 | ||
1551 | ;input: |
1546 | ;input: |
1552 | ; buf - 㪠§ ⥫ì áâபã, ç¨á«® ¤®«¦® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç®¬ ¢¨¤¥ |
1547 | ; buf - 㪠§ ⥫ì áâபã, ç¨á«® ¤®«¦® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç®¬ ¢¨¤¥ |
1553 | ;output: |
1548 | ;output: |
1554 | ; eax - ç¨á«® |
1549 | ; eax - ç¨á«® |
1555 | align 4 |
1550 | align 4 |
1556 | proc conv_str_to_int, buf:dword |
1551 | proc conv_str_to_int uses ebx ecx esi, buf:dword |
1557 | xor eax,eax |
- | |
1558 | push ebx ecx esi |
1552 | xor eax,eax |
1559 | xor ebx,ebx |
1553 | xor ebx,ebx |
1560 | mov esi,[buf] |
1554 | mov esi,[buf] |
1561 | ;®¯à¥¤¥«¥¨¥ ®âà¨æ ⥫ìëå ç¨á¥« |
1555 | ;®¯à¥¤¥«¥¨¥ ®âà¨æ ⥫ìëå ç¨á¥« |
1562 | xor ecx,ecx |
1556 | xor ecx,ecx |
Line 1615... | Line 1609... | ||
1615 | cmp ecx,0 ;¥á«¨ ç¨á«® ®âà¨æ ⥫쮥 |
1609 | cmp ecx,0 ;¥á«¨ ç¨á«® ®âà¨æ ⥫쮥 |
1616 | jne @f |
1610 | jne @f |
1617 | sub ecx,eax |
1611 | sub ecx,eax |
1618 | mov eax,ecx |
1612 | mov eax,ecx |
1619 | @@: |
1613 | @@: |
1620 | pop esi ecx ebx |
- | |
1621 | ret |
1614 | ret |
1622 | endp |
1615 | endp |
Line 1623... | Line 1616... | ||
1623 | 1616 | ||
1624 | ;¤ ë¥ ¤«ï ¤¨ «®£ ®âªàëâ¨ï ä ©«®¢ |
1617 | ;¤ ë¥ ¤«ï ¤¨ «®£ ®âªàëâ¨ï ä ©«®¢ |
Line 1659... | Line 1652... | ||
1659 | db 'RLE',0 |
1652 | db 'RLE',0 |
1660 | .end: |
1653 | .end: |
1661 | db 0 |
1654 | db 0 |
Line 1662... | Line -... | ||
1662 | - | ||
1663 | - | ||
1664 | - | ||
1665 | head_f_i: |
- | |
1666 | head_f_l db '"¨á⥬ ï ®è¨¡ª ',0 |
1655 | |
1667 | 1656 | ||
1668 | system_dir_0 db '/sys/lib/' |
- | |
1669 | lib_name_0 db 'proc_lib.obj',0 |
- | |
1670 | err_message_found_lib_0 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'proc_lib.obj',39,'" -tE',0 |
- | |
1671 | err_message_import_0 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,'" -tE',0 |
1657 | system_dir_0 db '/sys/lib/' |
1672 | 1658 | lib_name_0 db 'proc_lib.obj',0 |
|
1673 | system_dir_1 db '/sys/lib/' |
- | |
1674 | lib_name_1 db 'libimg.obj',0 |
- | |
1675 | err_message_found_lib_1 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'libimg.obj',39,'" -tE',0 |
- | |
1676 | err_message_import_1 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,'" -tE',0 |
1659 | system_dir_1 db '/sys/lib/' |
1677 | 1660 | lib_name_1 db 'libimg.obj',0 |
|
1678 | system_dir_2 db '/sys/lib/' |
- | |
1679 | lib_name_2 db 'buf2d.obj',0 |
- | |
Line 1680... | Line 1661... | ||
1680 | err_msg_found_lib_2 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'buf2d.obj',39,'" -tE',0 |
1661 | system_dir_2 db '/sys/lib/' |
1681 | err_msg_import_2 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,'" -tE',0 |
1662 | lib_name_2 db 'buf2d.obj',0 |
1682 | - | ||
1683 | l_libs_start: |
1663 | |
1684 | lib0 l_libs lib_name_0, 0, file_name, system_dir_0,\ |
- | |
1685 | err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i |
1664 | l_libs_start: |
1686 | lib1 l_libs lib_name_1, 0, file_name, system_dir_1,\ |
- | |
1687 | err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i |
1665 | lib0 l_libs lib_name_0, file_name, system_dir_0, import_proclib |
Line 1688... | Line 1666... | ||
1688 | lib2 l_libs lib_name_2, 0, file_name, system_dir_2,\ |
1666 | lib1 l_libs lib_name_1, file_name, system_dir_1, import_libimg |
1689 | err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i |
1667 | lib2 l_libs lib_name_2, file_name, system_dir_2, import_buf2d |
1690 | l_libs_end: |
1668 | l_libs_end: |
Line 1700... | Line 1678... | ||
1700 | aimg_to_rgb2 db 'img_to_rgb2',0 |
1678 | aimg_to_rgb2 db 'img_to_rgb2',0 |
1701 | aimg_decode db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ëå |
1679 | aimg_decode db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ëå |
1702 | aimg_destroy db 'img_destroy',0 |
1680 | aimg_destroy db 'img_destroy',0 |
Line 1703... | Line 1681... | ||
1703 | 1681 | ||
1704 | align 4 |
1682 | align 4 |
1705 | proclib_import: ;®¯¨á ¨¥ íªá¯®àâ¨à㥬ëå äãªæ¨© |
1683 | import_proclib: |
1706 | OpenDialog_Init dd aOpenDialog_Init |
1684 | OpenDialog_Init dd aOpenDialog_Init |
1707 | OpenDialog_Start dd aOpenDialog_Start |
1685 | OpenDialog_Start dd aOpenDialog_Start |
1708 | dd 0,0 |
1686 | dd 0,0 |
1709 | aOpenDialog_Init db 'OpenDialog_init',0 |
1687 | aOpenDialog_Init db 'OpenDialog_init',0 |
Line 1738... | Line 1716... | ||
1738 | .color: dd 0xffffd0 ;+16 color |
1716 | .color: dd 0xffffd0 ;+16 color |
1739 | db 24 ;+20 bit in pixel |
1717 | db 24 ;+20 bit in pixel |
Line 1740... | Line 1718... | ||
1740 | 1718 | ||
1741 | align 16 |
1719 | align 16 |
1742 | i_end: |
1720 | i_end: |
1743 | mouse_dd dd 0 |
1721 | mouse_dd rd 1 |
1744 | last_time dd 0 |
1722 | last_time rd 1 |
1745 | sc system_colors |
1723 | sc system_colors |
1746 | procinfo process_information |
- | |
1747 | rb 1024 |
- | |
1748 | stacktop: |
1724 | procinfo process_information |
1749 | sys_path rb 1024 |
- | |
1750 | file_name: |
1725 | sys_path rb 1024 |
1751 | rb 2048 ;4096 |
1726 | file_name rb 2048 ;4096 |
1752 | plugin_path rb 4096 |
1727 | plugin_path rb 4096 |
1753 | openfile_path rb 4096 |
1728 | openfile_path rb 4096 |
- | 1729 | filename_area rb 256 |
|
- | 1730 | rb 1024 |
|
1754 | filename_area rb 256 |
1731 | stacktop: |