Subversion Repositories Kolibri OS

Rev

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

Rev 5668 Rev 5677
Line 17... Line 17...
17
        DEBUGF  1,"RAW\n"
17
        DEBUGF  1,"RAW\n"
Line 18... Line 18...
18
 
18
 
19
        mov     eax, [rectangle.width]
19
        mov     eax, [rectangle.width]
20
        mov     ebx, [rectangle.height]
20
        mov     ebx, [rectangle.height]
-
 
21
        mul     ebx
21
        mul     ebx
22
if BITS_PER_PIXEL = 16
-
 
23
        shl     eax, 1
-
 
24
else if BITS_PER_PIXEL = 24
-
 
25
        lea     eax, [eax*2+eax]
22
        add     eax, esi
26
end if
-
 
27
  @@:
-
 
28
        push    eax
23
  @@:
29
        add     eax, esi
24
        cmp     [datapointer], eax
30
        cmp     [datapointer], eax
25
        jae     @f
-
 
26
        push    eax
31
        jae     @f
27
        call    read_data.more
32
        call    read_data.more
28
        pop     eax
33
        pop     eax
29
        jmp     @b
34
        jmp     @b
-
 
35
  @@:
Line 30... Line 36...
30
  @@:
36
        pop     eax
31
 
37
 
32
        mov     eax, [rectangle.y]
38
        mov     eax, [rectangle.y]
33
        movzx   ebx, [screen.width]
39
        movzx   ebx, [screen.width]
Line 38... Line 44...
38
 
44
 
39
        movzx   eax, [screen.width]
45
        movzx   eax, [screen.width]
40
        sub     eax, [rectangle.width]
46
        sub     eax, [rectangle.width]
Line 41... Line -...
41
        lea     ebp, [eax*3]                            ; ebp = ([screen.width]-[rectangle.width])*3
-
 
42
 
-
 
43
        mov     bl, 85
47
        lea     ebp, [eax*3]                            ; ebp = ([screen.width]-[rectangle.width])*3
Line 44... Line 48...
44
 
48
 
45
        mov     edx, [rectangle.height]
49
        mov     edx, [rectangle.height]
-
 
50
 
-
 
51
  .lineloop:
-
 
52
        mov     ecx, [rectangle.width]
Line -... Line 53...
-
 
53
if BITS_PER_PIXEL = 24
46
 
54
        lea     ecx, [ecx*2+ecx]
-
 
55
end if
47
  .lineloop:
56
 
48
        mov     ecx, [rectangle.width]
57
if BITS_PER_PIXEL = 8
49
 
58
  .pixelloop:
50
  .pixelloop:
59
        mov     bl, 85
-
 
60
        mov     al, [esi]
51
        mov     al, [esi]
61
        shr     al, 6
52
        shr     al, 4
-
 
53
        and     al, 3
62
        and     al, 3
54
        mul     bl
63
        mul     bl
55
        stosb
64
        stosb                   ; blue
56
 
65
        mov     bl, 36
57
        mov     al, [esi]
66
        mov     al, [esi]
58
        shr     al, 2
-
 
59
        and     al, 3
67
        shr     al, 3
60
        mul     bl
68
        and     al, 7
61
        stosb
69
        mul     bl
62
 
70
        stosb                   ; green
63
        mov     al, [esi]
-
 
64
        and     al, 3
71
        mov     al, [esi]
65
        mul     bl
72
        and     al, 7
66
        stosb
73
        mul     bl
-
 
74
        stosb                   ; red
-
 
75
        inc     esi
-
 
76
        dec     ecx
-
 
77
        jnz     .pixelloop
-
 
78
else if BITS_PER_PIXEL = 16
-
 
79
  .pixelloop:
-
 
80
        lodsw
-
 
81
        mov     bx, ax
-
 
82
        shl     al, 3
-
 
83
        and     al, 0xf8
-
 
84
        stosb                   ; blue
-
 
85
        mov     ax, bx
-
 
86
        shr     ax, 3
-
 
87
        and     al, 0xfc
-
 
88
        stosb                   ; green
-
 
89
        mov     al, bh
-
 
90
        and     al, 0xf8
-
 
91
        stosb                   ; red
-
 
92
        dec     ecx
Line 67... Line 93...
67
 
93
        jnz     .pixelloop
68
        inc     esi
94
else if BITS_PER_PIXEL = 24
69
        dec     ecx
95
        rep movsb
70
        jnz     .pixelloop
96
end if
71
 
-
 
72
        add     edi, ebp
-
 
73
        dec     edx
-