Subversion Repositories Kolibri OS

Rev

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

Rev 6162 Rev 6592
Line 16... Line 16...
16
;------------------------------------------------------------------------------
16
;------------------------------------------------------------------------------
17
include 'lang.inc'
17
include 'lang.inc'
18
include '../../../macros.inc'
18
include '../../../macros.inc'
19
include '../../../debug.inc'
19
include '../../../debug.inc'
20
purge   newline
20
purge   newline
-
 
21
;SMALL FONT
21
MAXSTRINGS = 45
22
MAXSTRINGS = 45
-
 
23
LINE_H = 10
-
 
24
WINDOW_W = 399
-
 
25
WINDOW_H = MAXSTRINGS*LINE_H+45
-
 
26
FONT_TYPE = 0x40000000
-
 
27
;BIG FONT
-
 
28
; MAXSTRINGS = 30
-
 
29
; LINE_H = 15
-
 
30
; WINDOW_W = 630
-
 
31
; WINDOW_H = MAXSTRINGS*LINE_H+50
-
 
32
; FONT_TYPE = 0x50000000
-
 
33
 
22
;------------------------------------------------------------------------------
34
;------------------------------------------------------------------------------
23
START:
35
START:
24
        call    CheckUnique
36
        call    CheckUnique
25
        mov     edi, filename
37
        mov     edi, filename
26
        cmp     [edi], byte 0
38
        cmp     [edi], byte 0
Line 44... Line 56...
44
        mov     byte [tmp1], 'x'
56
        mov     byte [tmp1], 'x'
45
        mov     byte [tmp2], 'x'
57
        mov     byte [tmp2], 'x'
Line 46... Line 58...
46
 
58
 
47
        mcall   14
59
        mcall   14
48
        and     eax, 0xffff0000
60
        and     eax, 0xffff0000
49
        sub     eax, 399 shl 16
61
        sub     eax, WINDOW_W shl 16
50
        add     eax, 399
62
        add     eax, WINDOW_W
51
        mov     [xstart], eax
63
        mov     [xstart], eax
Line 52... Line 64...
52
        mcall   48, 3, sc, sizeof.system_colors
64
        mcall   48, 3, sc, sizeof.system_colors
53
 
65
 
Line 205... Line 217...
205
        mcall   12, 1                     ; 1, start of draw
217
        mcall   12, 1                     ; 1, start of draw
206
        mcall   48, 5                     ; GetClientTop
218
        mcall   48, 5                     ; GetClientTop
207
        shr     ebx, 16
219
        shr     ebx, 16
208
        mov     ecx, ebx
220
        mov     ecx, ebx
209
        shl     ecx, 16
221
        shl     ecx, 16
210
        add     ecx, MAXSTRINGS*10+45     ; [y start] *65536 + [y size]
222
        add     ecx, WINDOW_H     ; [y start] *65536 + [y size]
211
        xor     eax, eax                  ; function 0 : define and draw window
-
 
212
        mov     edx, 0xffffff
223
        mov     edx, 0xffffff
213
        or      edx, 0x14000000
224
        or      edx, 0x14000000
214
        xor     esi, esi
225
        xor     esi, esi
215
        mcall   ,[xstart],,,,title
226
        mcall   0,[xstart],,,,title
216
        mov     ebx, 296 shl 16+31
227
        mov     ebx, 296 shl 16+31
217
        mcall   8,,<4,13>,3,[sc.work_button]
228
        mcall   8,,<4,13>,3,[sc.work_button]
218
        mov     edx, [vmode]
229
        mov     edx, [vmode]
219
        lea     edx, [edx*4+duk]
230
        lea     edx, [edx*4+duk]
220
        mov     ecx, 0x80
231
        mov     ecx, 0x80
Line 226... Line 237...
226
        ret
237
        ret
227
;------------------------------------------------------------------------------
238
;------------------------------------------------------------------------------
228
draw_text:
239
draw_text:
229
        mov     ebx, 15*65536+30          ; draw info text with function 4
240
        mov     ebx, 15*65536+30          ; draw info text with function 4
230
        xor     ecx, ecx
241
        xor     ecx, ecx
231
        or      ecx, 0x40000000
242
        or      ecx, FONT_TYPE
232
        mov     edi, 0xffffff
243
        mov     edi, 0xffffff
233
        mov     edx, text1
244
        mov     edx, text1
234
        cmp     [vmode], 0
245
        cmp     [vmode], 0
235
        je      .kern
246
        je      .kern
236
        mov     edx, text2
247
        mov     edx, text2
Line 253... Line 264...
253
@@:
264
@@:
254
        sub     esi, 4
265
        sub     esi, 4
255
        mov     eax, 4
266
        mov     eax, 4
256
newline:
267
newline:
257
        mcall
268
        mcall
258
        add     ebx, 10
269
        add     ebx, LINE_H
259
        add     edx, 80
270
        add     edx, 80
260
        cmp     [edx], byte 'x'
271
        cmp     [edx], byte 'x'
261
        jne     newline
272
        jne     newline
262
        ret
273
        ret