diff --git a/programs/develop/libraries/libs-dev/libimg/bmp/bmp.asm b/programs/develop/libraries/libs-dev/libimg/bmp/bmp.asm index 5d55801ae9..09a896f39d 100644 --- a/programs/develop/libraries/libs-dev/libimg/bmp/bmp.asm +++ b/programs/develop/libraries/libs-dev/libimg/bmp/bmp.asm @@ -92,11 +92,13 @@ img.decode.bmp.length_rest equ length_rest mov [bTopDown], 0 - cmp eax, 12 + cmp eax, 12 ; 0x0C jz .old1 - cmp eax, 40 + cmp eax, 40 ; 0x28 jz .normal - cmp eax, 56 + cmp eax, 56 ; 0x38 + je .normal + cmp eax, 108 ; 0x6C jnz .error ; convert images with <= 8 bpp to 8bpp, other - to 32 bpp .normal: diff --git a/programs/develop/libraries/libs-dev/libimg/libimg.asm b/programs/develop/libraries/libs-dev/libimg/libimg.asm index e8daa8e686..6cb699f94c 100644 --- a/programs/develop/libraries/libs-dev/libimg/libimg.asm +++ b/programs/develop/libraries/libs-dev/libimg/libimg.asm @@ -884,13 +884,17 @@ endl mov ecx, [scanline_len] push ecx shr ecx, 2 - @@: mov eax, [esi] + @@: + dec ecx + js @f + mov eax, [esi] xchg eax, [edi] mov [esi], eax add esi, 4 add edi, 4 - sub ecx, 1 - jnz @b + jmp @b + @@: + pop ecx and ecx, 3 jz .cont_line_vert diff --git a/programs/develop/libraries/libs-dev/libimg/pcx/pcx.asm b/programs/develop/libraries/libs-dev/libimg/pcx/pcx.asm index 4f42fcedad..32faf57e91 100644 --- a/programs/develop/libraries/libs-dev/libimg/pcx/pcx.asm +++ b/programs/develop/libraries/libs-dev/libimg/pcx/pcx.asm @@ -18,7 +18,6 @@ ;;================================================================================================;; include 'pcx.inc' -;include '../../../../system/board/trunk/debug.inc' ;;================================================================================================;; proc img.is.pcx _data, _length ;//////////////////////////////////////////////////////////////////;; @@ -238,14 +237,16 @@ endp ;;================================================================================================;; -proc img.encode.pcx _img, _p_length, _options ;///////////////////////////////////////////////////;; +proc img.encode.pcx _img, _common, _specific ;////////////////////////////////////////////////////;; ;;------------------------------------------------------------------------------------------------;; -;? Encode image into raw data in pcx format ;; +;? Encode image into raw data in pcx format ;; ;;------------------------------------------------------------------------------------------------;; -;> _img = pointer to image ;; +;> [_img] = pointer to image ;; +;> [_common] = format independent options ;; +;> [_specific] = 0 / pointer to the structure of format specific options ;; ;;------------------------------------------------------------------------------------------------;; -;< eax = 0 (error) or pointer to encoded data ;; -;< _p_length = encoded data length ;; +;< eax = 0 / pointer to encoded data ;; +;< ecx = error code / the size of encoded data ;; ;;================================================================================================;; xor eax, eax ret