Subversion Repositories Kolibri OS

Rev

Rev 5668 | Rev 5715 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5668 Rev 5677
Line 11... Line 11...
11
;;             Version 2, June 1991                                ;;
11
;;             Version 2, June 1991                                ;;
12
;;                                                                 ;;
12
;;                                                                 ;;
13
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 14... Line 14...
14
 
14
 
-
 
15
pixel_to_24bpp:         ; returns in ecx, destroys eax, ebx
15
pixel_to_24bpp:         ; returns in ecx, destroys eax, ebx
16
if BITS_PER_PIXEL = 8
16
; Convert pixel to 24BPP
17
; Convert pixel to 24BPP
17
        mov     bl, 85
18
        mov     bl, 85
18
        mov     al, [esi]
19
        mov     al, [esi]
19
        shr     al, 4
20
        shr     al, 6
20
        and     al, 3
21
        and     al, 3
-
 
22
        mul     bl
21
        mul     bl
23
        mov     ch, al          ; blue
22
        mov     cl, al
24
        mov     bl, 36
23
        mov     al, [esi]
25
        mov     al, [esi]
24
        shr     al, 2
26
        shr     al, 3
25
        and     al, 3
27
        and     al, 7
26
        mul     bl
28
        mul     bl
27
        mov     ch, al
29
        mov     cl, al          ; green
28
        mov     al, [esi]
30
        mov     al, [esi]
29
        and     al, 3
31
        and     al, 7
30
        mul     bl
32
        mul     bl
-
 
33
        shr     ecx, 8
-
 
34
        mov     cl, al          ; red
-
 
35
        inc     esi
-
 
36
else if BITS_PER_PIXEL = 16
31
        shl     ecx, 8
37
        lodsw
-
 
38
        mov     cl, al
-
 
39
        shl     cl, 3
-
 
40
        and     cx, 0x00f8      ; blue
-
 
41
        shl     ecx, 16
-
 
42
        mov     cx, ax
-
 
43
        shl     cx, 5
-
 
44
        and     ch, 0xfc        ; green
-
 
45
        mov     cl, ah
-
 
46
        and     al, 0xf8        ; red
-
 
47
else
-
 
48
        xor     ecx, ecx
-
 
49
        mov     cx, [esi]
-
 
50
        shr     ecx, 8
-
 
51
        mov     cl, [esi+2]
-
 
52
        add     esi, 3
Line 32... Line 53...
32
        mov     cl, al
53
end if
Line 33... Line 54...
33
 
54
 
Line 34... Line 55...
34
        ret
55
        ret
Line 35... Line 56...
35
 
56
 
36
encoding_RRE:
57
encoding_RRE:
37
 
58
 
38
        DEBUGF  1,"RRE\n"
59
        DEBUGF  2,"RRE\n"