From f38db0969e7dfb483f8865d9abf3242b6abbf2a5 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Mon, 3 Nov 2014 13:01:35 +0000 Subject: [PATCH] 16bpp support. git-svn-id: svn://kolibrios.org@5158 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/media/scrshoot/gp.inc | 38 +++++++++++++++++++++++++--- programs/media/scrshoot/scrshoot.asm | 2 ++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/programs/media/scrshoot/gp.inc b/programs/media/scrshoot/gp.inc index af4ebaa7f7..c663492c0f 100644 --- a/programs/media/scrshoot/gp.inc +++ b/programs/media/scrshoot/gp.inc @@ -17,17 +17,19 @@ pusha cmp csi_bitspp,word 24 je .next_str_24 + cmp csi_bitspp,word 16 + je .next_str_16 .next_str_32: push edx ebx xor ebx,ebx @@: - ;push eax + ;push eax mov eax,[gs:edx] mov [edi+ecx],ax shr eax,8 mov [edi+ecx+2],ah - ;pop eax + ;pop eax add ecx,3 add edx,4;eax inc bx @@ -45,12 +47,12 @@ ret push edx ebx xor ebx,ebx @@: - ;push eax + ;push eax mov eax,[gs:edx] mov [edi+ecx],ax shr eax,8 mov [edi+ecx+2],ah - ;pop eax + ;pop eax add ecx,3 add edx,3;eax inc bx @@ -64,6 +66,34 @@ ret popa ret +.next_str_16: + push edx ebx + xor ebx,ebx +@@: + ;push eax + mov eax,[gs:edx] + shl eax, 3 + ror eax, 8 + shl ax, 2 + ror eax, 8 + shl al, 3 + mov [edi+ecx+2],al + rol eax, 16 + mov [edi+ecx],ax + ;pop eax + add ecx,3 + add edx,2 + inc bx + cmp bx,csi_width + jl @b + pop ebx edx + add edx,csi_bytesps + inc bx + cmp bx,csi_height + jl .next_str_16 +popa +ret + copy_area: mov eax,[scr.bytesps] mov ebx,eax diff --git a/programs/media/scrshoot/scrshoot.asm b/programs/media/scrshoot/scrshoot.asm index 72f690eac9..9d4166ecf7 100644 --- a/programs/media/scrshoot/scrshoot.asm +++ b/programs/media/scrshoot/scrshoot.asm @@ -14,6 +14,8 @@ ; 31.01.07 - всё теперь рисуется относительно клиентской области ; 02.11.10 - Используется checkbox версии 2 +format binary as "" + title equ 'Screenshooter v 1.2' ; Заголовок окна include '../../develop/libraries/box_lib/load_lib.mac' include '../../develop/libraries/box_lib/trunk/box_lib.mac'