Rev 1079 | Rev 1152 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1079 | Rev 1102 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | include 'gif/gif.asm' |
35 | include 'gif/gif.asm' |
36 | include 'jpeg/jpeg.asm' |
36 | include 'jpeg/jpeg.asm' |
37 | include 'png/png.asm' |
37 | include 'png/png.asm' |
38 | include 'tga/tga.asm' |
38 | include 'tga/tga.asm' |
39 | include 'z80/z80.asm' |
39 | include 'z80/z80.asm' |
- | 40 | include 'ico_cur/ico_cur.asm' |
|
Line 40... | Line 41... | ||
40 | 41 | ||
41 | ;;================================================================================================;; |
42 | ;;================================================================================================;; |
42 | proc lib_init ;///////////////////////////////////////////////////////////////////////////////////;; |
43 | proc lib_init ;///////////////////////////////////////////////////////////////////////////////////;; |
43 | ;;------------------------------------------------------------------------------------------------;; |
44 | ;;------------------------------------------------------------------------------------------------;; |
Line 494... | Line 495... | ||
494 | ret |
495 | ret |
Line 495... | Line 496... | ||
495 | 496 | ||
Line 496... | Line 497... | ||
496 | endp |
497 | endp |
497 | 498 | ||
498 | ;;================================================================================================;; |
499 | ;;================================================================================================;; |
499 | proc img.decode _data, _length ;//////////////////////////////////////////////////////////////////;; |
500 | proc img.decode _data, _length, _options ;////////////////////////////////////////////////////////;; |
500 | ;;------------------------------------------------------------------------------------------------;; |
501 | ;;------------------------------------------------------------------------------------------------;; |
501 | ;? --- TBD --- ;; |
502 | ;? --- TBD --- ;; |
502 | ;;------------------------------------------------------------------------------------------------;; |
503 | ;;------------------------------------------------------------------------------------------------;; |
Line 508... | Line 509... | ||
508 | mov ebx, img._.formats_table |
509 | mov ebx, img._.formats_table |
509 | @@: stdcall [ebx + FormatsTableEntry.Is], [_data], [_length] |
510 | @@: stdcall [ebx + FormatsTableEntry.Is], [_data], [_length] |
510 | or eax, eax |
511 | or eax, eax |
511 | jnz @f |
512 | jnz @f |
512 | add ebx, sizeof.FormatsTableEntry |
513 | add ebx, sizeof.FormatsTableEntry |
513 | cmp dword[ebx], 0 |
514 | cmp dword[ebx], eax ;0 |
514 | jnz @b |
515 | jnz @b |
515 | jmp .error |
516 | pop ebx |
516 | @@: stdcall [ebx + FormatsTableEntry.Decode], [_data], [_length] |
- | |
517 | - | ||
518 | .error: |
- | |
519 | ret |
517 | ret |
- | 518 | @@: mov eax, [ebx + FormatsTableEntry.Decode] |
|
- | 519 | pop ebx |
|
- | 520 | leave |
|
- | 521 | jmp eax |
|
520 | endp |
522 | endp |
Line 521... | Line 523... | ||
521 | 523 | ||
522 | ;;================================================================================================;; |
524 | ;;================================================================================================;; |
523 | proc img.encode _img, _p_length ;/////////////////////////////////////////////////////////////////;; |
525 | proc img.encode _img, _p_length, _options ;///////////////////////////////////////////////////////;; |
524 | ;;------------------------------------------------------------------------------------------------;; |
526 | ;;------------------------------------------------------------------------------------------------;; |
525 | ;? --- TBD --- ;; |
527 | ;? --- TBD --- ;; |
526 | ;;------------------------------------------------------------------------------------------------;; |
528 | ;;------------------------------------------------------------------------------------------------;; |
527 | ;> --- TBD --- ;; |
529 | ;> --- TBD --- ;; |
Line 1665... | Line 1667... | ||
1665 | ;;================================================================================================;; |
1667 | ;;================================================================================================;; |
Line 1666... | Line 1668... | ||
1666 | 1668 | ||
1667 | align 4 |
1669 | align 4 |
1668 | img._.formats_table: |
1670 | img._.formats_table: |
1669 | .bmp dd img.is.bmp, img.decode.bmp, img.encode.bmp |
1671 | .bmp dd img.is.bmp, img.decode.bmp, img.encode.bmp |
1670 | ; .ico dd img.is.ico, img.decode.ico, img.encode.ico |
1672 | .ico dd img.is.ico, img.decode.ico_cur, img.encode.ico |
1671 | ; .cur dd img.is.cur, img.decode.cur, img.encode.cur |
1673 | .cur dd img.is.cur, img.decode.ico_cur, img.encode.cur |
1672 | .gif dd img.is.gif, img.decode.gif, img.encode.gif |
1674 | .gif dd img.is.gif, img.decode.gif, img.encode.gif |
1673 | .png dd img.is.png, img.decode.png, img.encode.png |
1675 | .png dd img.is.png, img.decode.png, img.encode.png |
1674 | .jpg dd img.is.jpg, img.decode.jpg, img.encode.jpg |
1676 | .jpg dd img.is.jpg, img.decode.jpg, img.encode.jpg |
1675 | .tga dd img.is.tga, img.decode.tga, img.encode.tga |
1677 | .tga dd img.is.tga, img.decode.tga, img.encode.tga |
Line 1705... | Line 1707... | ||
1705 | align 4 |
1707 | align 4 |
1706 | @EXPORT: |
1708 | @EXPORT: |
Line 1707... | Line 1709... | ||
1707 | 1709 | ||
1708 | export \ |
1710 | export \ |
1709 | lib_init , 'lib_init' , \ |
1711 | lib_init , 'lib_init' , \ |
1710 | 0x00010004 , 'version' , \ |
1712 | 0x00050005 , 'version' , \ |
1711 | img.is_img , 'img.is_img' , \ |
1713 | img.is_img , 'img_is_img' , \ |
1712 | img.info , 'img.info' , \ |
1714 | img.info , 'img_info' , \ |
1713 | img.from_file , 'img.from_file' , \ |
1715 | img.from_file , 'img_from_file' , \ |
1714 | img.to_file , 'img.to_file' , \ |
1716 | img.to_file , 'img_to_file' , \ |
1715 | img.from_rgb , 'img.from_rgb' , \ |
1717 | img.from_rgb , 'img_from_rgb' , \ |
1716 | img.to_rgb , 'img.to_rgb' , \ |
1718 | img.to_rgb , 'img_to_rgb' , \ |
1717 | img.to_rgb2 , 'img.to_rgb2' , \ |
1719 | img.to_rgb2 , 'img_to_rgb2' , \ |
1718 | img.decode , 'img.decode' , \ |
1720 | img.decode , 'img_decode' , \ |
1719 | img.encode , 'img.encode' , \ |
1721 | img.encode , 'img_encode' , \ |
1720 | img.create , 'img.create' , \ |
1722 | img.create , 'img_create' , \ |
1721 | img.destroy , 'img.destroy' , \ |
1723 | img.destroy , 'img_destroy' , \ |
1722 | img.destroy.layer, 'img.destroy.layer', \ |
1724 | img.destroy.layer, 'img_destroy_layer', \ |
1723 | img.count , 'img.count' , \ |
1725 | img.count , 'img_count' , \ |
1724 | img.lock_bits , 'img.lock_bits' , \ |
1726 | img.lock_bits , 'img_lock_bits' , \ |
1725 | img.unlock_bits , 'img.unlock_bits' , \ |
1727 | img.unlock_bits , 'img_unlock_bits' , \ |
1726 | img.flip , 'img.flip' , \ |
1728 | img.flip , 'img_flip' , \ |
1727 | img.flip.layer , 'img.flip.layer' , \ |
1729 | img.flip.layer , 'img_flip_layer' , \ |
1728 | img.rotate , 'img.rotate' , \ |
1730 | img.rotate , 'img_rotate' , \ |
1729 | img.rotate.layer, 'img.rotate.layer', \ |
1731 | img.rotate.layer, 'img_rotate_layer', \ |
Line 1730... | Line 1732... | ||
1730 | img.draw , 'img.draw' |
1732 | img.draw , 'img_draw' |
1731 | 1733 | ||
1732 | ; import from deflate unpacker |
1734 | ; import from deflate unpacker |
1733 | ; is initialized only when PNG loading is requested |
1735 | ; is initialized only when PNG loading is requested |
Line 1734... | Line 1736... | ||
1734 | align 4 |
1736 | align 4 |
1735 | @IMPORT: |
1737 | @IMPORT: |
1736 | 1738 | ||
Line 1737... | Line 1739... | ||
1737 | library kfar_arc, '../File Managers/kfar_arc.obj' |
1739 | library archiver, 'archiver.obj' |
1738 | import kfar_arc, \ |
1740 | import archiver, \ |
1739 | deflate_unpack2, 'deflate_unpack2' |
1741 | deflate_unpack2, 'deflate_unpack2' |