Subversion Repositories Kolibri OS

Rev

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

Rev 2430 Rev 2436
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 2430 $
8
$Revision: 2436 $
9
 
9
 
10
; // Alver 22.06.2008 // {
10
;------------------------------------------------------------------------------
11
align 4
11
align 4
12
dtext_asciiz_esi:                          ; for skins title out
12
dtext_asciiz_esi:                          ; for skins title out
13
        push    eax
13
        push    eax
14
        xor     eax, eax
14
        xor     eax, eax
15
        inc     eax
15
        inc     eax
16
        jmp     dtext.1
-
 
17
; } \\ Alver \\
16
        jmp     dtext.1
18
 
17
;------------------------------------------------------------------------------
19
align 4
18
align 4
20
dtext:  ; Text String Output (rw by Johnny_B[john@kolibrios.org])
19
dtext:  ; Text String Output (rw by Johnny_B[john@kolibrios.org])
21
        ; ebx x & y
20
        ; ebx x & y
22
        ; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB )
21
        ; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB )
23
        ; X = ABnnb:
22
        ; X = ABnnb:
24
        ; nn = font
23
        ; nn = font
25
        ; A = 0 <=> output esi characters; otherwise output ASCIIZ string
24
        ; A = 0 <=> output esi characters; otherwise output ASCIIZ string
26
        ; B = 1 <=> fill background with color eax
25
        ; B = 1 <=> fill background with color eax
27
        ; edx start of text
-
 
28
        ; edi 1 force
-
 
29
 
26
        ; edx start of text
30
; // Alver 22.06.2008 // {
27
        ; edi 1 force
-
 
28
        push    eax
-
 
29
        xor     eax, eax
31
        push    eax
30
;--------------------------------------
32
        xor     eax, eax
-
 
33
.1:
31
align 4
34
; } \\ Alver \\
32
.1:
35
        pushad
33
        pushad
36
        movsx   eax, bx         ; eax=y
34
        movsx   eax, bx         ; eax=y
37
        sar     ebx, 16         ; ebx=x
35
        sar     ebx, 16         ; ebx=x
38
        xchg    eax, ebx        ; eax=x, ebx=y
36
        xchg    eax, ebx        ; eax=x, ebx=y
39
        cmp     esi, 255
37
        cmp     esi, 255
-
 
38
        jb      .loop
-
 
39
        mov     esi, 255
40
        jb      .loop
40
;--------------------------------------
41
        mov     esi, 255
41
align 4
42
.loop:
42
.loop:
43
        test    ecx, ecx
43
        test    ecx, ecx
44
        js      .test_asciiz
44
        js      .test_asciiz
45
        dec     esi
45
        dec     esi
-
 
46
        js      .end
-
 
47
        jmp     @f
46
        js      .end
48
;--------------------------------------
47
        jmp     @f
49
align 4
48
.test_asciiz:
50
.test_asciiz:
49
        cmp     byte [edx], 0
-
 
-
 
51
        cmp     byte [edx], 0
50
        jz      .end
52
        jz      .end
51
; // Alver 22.06.2008 // {
53
 
52
        cmp     byte [esp+28], 1
54
        cmp     byte [esp+28], 1
53
        jne     @f
55
        jne     @f
-
 
56
        dec     esi
54
        dec     esi
57
        js      .end
55
        js      .end
58
;--------------------------------------
56
; } \\ Alver \\
59
align 4
57
@@:
60
@@:
58
        inc     edx
61
        inc     edx
59
        pushad
62
        pushad
60
        movzx   edx, byte [edx-1]
63
        movzx   edx, byte [edx-1]
61
        test    ecx, 0x10000000
64
        test    ecx, 0x10000000
62
        jnz     .font2
65
        jnz     .font2
-
 
66
        mov     esi, 9
-
 
67
        lea     ebp, [FONT_I+8*edx+edx]
63
        mov     esi, 9
68
;--------------------------------------
64
        lea     ebp, [FONT_I+8*edx+edx]
69
align 4
65
.symloop1:
70
.symloop1:
-
 
71
        mov     dl, byte [ebp]
-
 
72
        or      dl, 1 shl 6
66
        mov     dl, byte [ebp]
73
;--------------------------------------
67
        or      dl, 1 shl 6
74
align 4
68
.pixloop1:
75
.pixloop1:
69
        shr     dl, 1
76
        shr     dl, 1
70
        jz      .pixloop1end
77
        jz      .pixloop1end
71
        jnc     .nopix
78
        jnc     .nopix
72
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
79
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
-
 
80
        call    [putpixel]
-
 
81
        jmp     .pixloop1cont
73
        call    [putpixel]
82
;--------------------------------------
74
        jmp     .pixloop1cont
83
align 4
75
.nopix:
84
.nopix:
76
        test    ecx, 0x40000000
85
        test    ecx, 0x40000000
77
        jz      .pixloop1cont
86
        jz      .pixloop1cont
78
        push    ecx
87
        push    ecx
79
        mov     ecx, [esp+4+20h+20h]
88
        mov     ecx, [esp+4+20h+20h]
80
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
89
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
-
 
90
        call    [putpixel]
-
 
91
        pop     ecx
81
        call    [putpixel]
92
;--------------------------------------
82
        pop     ecx
93
align 4
83
.pixloop1cont:
94
.pixloop1cont:
-
 
95
        inc     eax
-
 
96
        jmp     .pixloop1
84
        inc     eax
97
;--------------------------------------
85
        jmp     .pixloop1
98
align 4
86
.pixloop1end:
99
.pixloop1end:
87
        sub     eax, 6
100
        sub     eax, 6
88
        inc     ebx
101
        inc     ebx
89
        inc     ebp
102
        inc     ebp
90
        dec     esi
103
        dec     esi
91
        jnz     .symloop1
104
        jnz     .symloop1
92
        popad
105
        popad
-
 
106
        add     eax, 6
-
 
107
        jmp     .loop
93
        add     eax, 6
108
;--------------------------------------
94
        jmp     .loop
109
align 4
95
.font2:
110
.font2:
96
        add     edx, edx
111
        add     edx, edx
97
        lea     ebp, [FONT_II+4*edx+edx+1]
112
        lea     ebp, [FONT_II+4*edx+edx+1]
-
 
113
        push    9
-
 
114
        movzx   esi, byte [ebp-1]
98
        push    9
115
;--------------------------------------
99
        movzx   esi, byte [ebp-1]
116
align 4
100
.symloop2:
117
.symloop2:
-
 
118
        mov     dl, byte [ebp]
-
 
119
        push    esi
101
        mov     dl, byte [ebp]
120
;--------------------------------------
102
        push    esi
121
align 4
103
.pixloop2:
122
.pixloop2:
104
        shr     dl, 1
123
        shr     dl, 1
105
        jnc     .nopix2
124
        jnc     .nopix2
106
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
125
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
-
 
126
        call    [putpixel]
-
 
127
        jmp     .pixloop2cont
107
        call    [putpixel]
128
;--------------------------------------
108
        jmp     .pixloop2cont
129
align 4
109
.nopix2:
130
.nopix2:
110
        test    ecx, 0x40000000
131
        test    ecx, 0x40000000
111
        jz      .pixloop2cont
132
        jz      .pixloop2cont
112
        push    ecx
133
        push    ecx
113
        mov     ecx, [esp+12+20h+20h]
134
        mov     ecx, [esp+12+20h+20h]
114
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
135
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
-
 
136
        call    [putpixel]
-
 
137
        pop     ecx
115
        call    [putpixel]
138
;--------------------------------------
116
        pop     ecx
139
align 4
117
.pixloop2cont:
140
.pixloop2cont:
118
        inc     eax
141
        inc     eax
119
        dec     esi
142
        dec     esi
Line 126... Line 149...
126
        jnz     .symloop2
149
        jnz     .symloop2
127
        pop     eax
150
        pop     eax
128
        add     dword [esp+28], esi
151
        add     dword [esp+28], esi
129
        popad
152
        popad
130
        jmp     .loop
153
        jmp     .loop
-
 
154
;--------------------------------------
-
 
155
align 4
131
.end:
156
.end:
132
        popad
157
        popad
133
        pop     eax             ; << // Alver 22.06.2008 // <<
158
        pop     eax
134
        ret
159
        ret
-
 
160
;------------------------------------------------------------------------------