proper include of missed file

git-svn-id: svn://kolibrios.org@6608 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
pathoswithin 2016-10-19 19:00:57 +00:00
parent d210a76d45
commit 437682c9a5
2 changed files with 218 additions and 76 deletions

View File

@ -39,6 +39,7 @@ include 'features.inc' ; features decoding
include 'logos.inc' ; include file where gif's are stored include 'logos.inc' ; include file where gif's are stored
include 'rsatest.inc' include 'rsatest.inc'
include 'variable.inc' include 'variable.inc'
include 'gif_lite.inc'
@use_library @use_library
@ -2328,7 +2329,7 @@ draw_window:
mov esi, knopka mov esi, knopka
mov edi, img_area2 mov edi, img_area2
call load_gif2 call ReadGIF
PutImage 15,345,93,24,img_area2+8 ; image "press for more" PutImage 15,345,93,24,img_area2+8 ; image "press for more"
; place size ; place size
@ -2337,7 +2338,7 @@ PutImage 15,345,93,24,img_area2+8 ; image "press for more"
mov esi, knopka2 mov esi, knopka2
mov edi, img_area3 mov edi, img_area3
call load_gif2 call ReadGIF
PutImage 15,380,93,24,img_area3+8 ; image "save" PutImage 15,380,93,24,img_area3+8 ; image "save"
; place size ; place size
@ -3073,13 +3074,10 @@ store_data:
mcall 70,fileinfo mcall 70,fileinfo
ret ret
load_gif: load_gif:
mov edi, img_area mov edi, img_area
load_gif2: jmp ReadGIF
COLOR_ORDER equ MENUETOS
; DATA AREA ; DATA AREA
@ -4330,143 +4328,77 @@ stacktop:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
Proc_Info process_information Proc_Info process_information
; RSA test data ; RSA test data
align 4 align 4
num1 rd 40 num1 rd 40
num2 rd 40 num2 rd 40
num3 rd 40 num3 rd 40
iter rd 1 iter rd 1
openkey rd 1 openkey rd 1
IncludeUGlobals IncludeUGlobals
nocpuid db 0x0 nocpuid db ?
ost dd ? ost dd ?
sot dd ? sot dd ?
f dd ? f dd ?
m dd ? m dd ?
s dd ? s dd ?
t dd ? t dd ?
ef dd ? ef dd ?
em dd ? em dd ?
multiplier dd ? multiplier dd ?
multa dd ? multa dd ?
multb dd ? multb dd ?
smallvendor dd ? smallvendor dd ?
L1d dd ? L1d dd ?
L1i dd ? L1i dd ?
L2 dd ? L2 dd ?
L3 dd ? L3 dd ?
micron dd ? micron dd ?
brand dd ?
brand dd ?
newpc dd ? newpc dd ?
nomultiplier dd ?
nomultiplier dd ?
ram_size_a dd ? ram_size_a dd ?
ram_size_t dd ? ram_size_t dd ?
stdc dd ? stdc dd ?
extc dd ? extc dd ?
FRS dd ? FRS dd ?
freqsel db ? freqsel db ?
sse3sup db ? sse3sup db ?
sse41sup dd ? sse41sup dd ?
sse42sup dd ? sse42sup dd ?
sse5sup dd ? sse5sup dd ?
freqbb dd ? freqbb dd ?
freqll dd ? freqll dd ?
wayli dd ? wayli dd ?
lineli dd ? lineli dd ?
wayld dd ? wayld dd ?
lineld dd ? lineld dd ?
wayl2 dd ? wayl2 dd ?
linel2 dd ? linel2 dd ?
wayl3 dd ? wayl3 dd ?
linel3 dd ? linel3 dd ?
che db ? ; numbers of calls for Intel caches detection che db ? ; numbers of calls for Intel caches detection
cname dd ? cname dd ?
codeN dd ? codeN dd ?
myname: myname:
rb 48 rb 48
mynamelen: mynamelen:
db 0x0 db ?
align 4 align 4
thread2_stack_area rb 64 thread2_stack_area rb 64
thread2_esp = $ thread2_esp = $
U_END: U_END:

View File

@ -0,0 +1,210 @@
uglobal
align 4
ReadGIF.globalColor dd ?
ReadGIF.cur_info dd ? ; image table pointer
ReadGIF.codesize dd ?
ReadGIF.compsize dd ?
ReadGIF.bit_count dd ?
ReadGIF.CC dd ?
ReadGIF.EOI dd ?
ReadGIF.Palette dd ?
ReadGIF.block_ofs dd ?
ReadGIF.gif_workarea rb 16*1024
endg
; unpacks GIF image
ReadGIF:
; in:
; esi - pointer to GIF file in memory
; edi - pointer to output image list
; out:
; eax=0 -> ok, eax=1 -> invalid signature
; eax>=8 -> unsupported image attributes
push esi edi
mov [.cur_info],edi
xor eax,eax
mov [.globalColor],eax
inc eax
cmp dword[esi],'GIF8'
jne .ex ; signature
mov ecx,[esi+0xa]
add esi,0xd
mov edi,esi
test cl,cl
jns .nextblock
mov [.globalColor],esi
call .Gif_skipmap
.nextblock:
cmp byte[edi],0x21
jne .noextblock
inc edi
inc edi
.block_skip:
movzx eax,byte[edi]
lea edi,[edi+eax+1]
test eax,eax
jnz .block_skip
jmp .nextblock
.noextblock:
mov al,8
cmp byte[edi],0x2c ; image beginning
jne .ex
inc edi
mov esi,[.cur_info]
xchg esi,edi
movzx eax,word[esi+4]
stosd
movzx eax,word[esi+6]
stosd
add esi,8
push edi
mov ecx,[esi]
inc esi
test cl,cl
js .uselocal
push [.globalColor]
mov edi,esi
jmp .setPal
.uselocal:
call .Gif_skipmap
push esi
.setPal:
movzx ecx,byte[edi]
inc ecx
mov [.codesize],ecx
dec ecx
pop [.Palette]
lea esi,[edi+1]
mov edi,.gif_workarea
xor eax,eax
lodsb ; eax - block_count
add eax,esi
mov [.block_ofs],eax
mov [.bit_count],8
mov eax,1
shl eax,cl
mov [.CC],eax
mov ecx,eax
inc eax
mov [.EOI],eax
mov eax, 1000h shl 16
.filltable:
stosd
inc eax
loop .filltable
pop edi
.reinit:
mov edx,[.EOI]
inc edx
push [.codesize]
pop [.compsize]
call .Gif_get_sym
cmp eax,[.CC]
je .reinit
call .Gif_output
.cycle:
movzx ebx,ax
call .Gif_get_sym
cmp eax,edx
jae .notintable
cmp eax,[.CC]
je .reinit
cmp eax,[.EOI]
je .end
call .Gif_output
.add:
mov dword [.gif_workarea+edx*4],ebx
cmp edx,0xFFF
jae .cycle
inc edx
bsr ebx,edx
cmp ebx,[.compsize]
jne .noinc
inc [.compsize]
.noinc:
jmp .cycle
.notintable:
push eax
mov eax,ebx
call .Gif_output
push ebx
movzx eax,bx
call .Gif_output
pop ebx eax
jmp .add
.end:
xor eax,eax
.ex:
pop edi esi
ret
.Gif_skipmap:
; in: ecx - image descriptor, esi - pointer to colormap
; out: edi - pointer to area after colormap
and ecx,111b
inc ecx ; color map size
mov ebx,1
shl ebx,cl
lea ebx,[ebx*2+ebx]
lea edi,[esi+ebx]
ret
.Gif_get_sym:
mov ecx,[.compsize]
push ecx
xor eax,eax
.shift:
ror byte[esi],1
rcr eax,1
dec [.bit_count]
jnz .loop1
inc esi
cmp esi,[.block_ofs]
jb .noblock
push eax
xor eax,eax
lodsb
test eax,eax
jnz .nextbl
mov eax,[.EOI]
sub esi,2
add esp,8
jmp .exx
.nextbl:
add eax,esi
mov [.block_ofs],eax
pop eax
.noblock:
mov [.bit_count],8
.loop1:
loop .shift
pop ecx
rol eax,cl
.exx:
xor ecx,ecx
ret
.Gif_output:
push esi eax edx
mov edx,.gif_workarea
.next:
push word[edx+eax*4]
mov ax,word[edx+eax*4+2]
inc ecx
cmp ax,1000h
jnz .next
shl ebx,16
mov bx,[esp]
.loop2:
pop ax
lea esi,[eax+eax*2]
add esi,[.Palette]
mov esi,[esi]
bswap esi
shr esi,8
mov [edi],esi
add edi,3
loop .loop2
pop edx eax esi
ret