Subversion Repositories Kolibri OS

Rev

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

Rev 488 Rev 523
Line 1... Line 1...
1
$Revision: 488 $
1
$Revision: 523 $
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
;;                                                              ;;
3
;;                                                              ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
5
;; Distributed under terms of the GNU General Public License    ;;
5
;; Distributed under terms of the GNU General Public License    ;;
6
;;                                                              ;;
6
;;                                                              ;;
Line 8... Line 8...
8
 
8
 
Line 9... Line 9...
9
include "skindata.inc"
9
include "skindata.inc"
Line 10... Line 10...
10
 
10
 
-
 
11
;skin_data = 0x00778000
11
;skin_data = 0x00778000
12
 
12
 
13
read_skin_file:
-
 
14
        stdcall load_file, ebx
-
 
15
        test    eax, eax
-
 
16
        jz      .notfound
-
 
17
        cmp     dword [eax], 'SKIN'
13
load_skin_file:
18
        jnz     .noskin
-
 
19
        cmp     ebx, 32*1024
-
 
20
        jb      @f
14
; eax = filename
21
        mov     ebx, 32*1024
15
; edx = destination
22
@@:
16
    mov   ebx,1
23
        lea     ecx, [ebx+3]
17
    or    ecx,-1
24
        shr     ecx, 2
18
    mov   esi,12
25
        mov     esi, eax
19
    pushad
26
        mov     edi, skin_data
20
    push eax
27
        rep     movsd
-
 
28
        stdcall kernel_free, eax
-
 
29
 
-
 
30
        call    parse_skin_data
21
    mov [skin_to_load.adr],edx
31
        xor     eax, eax
22
 
32
        ret
-
 
33
.notfound:
-
 
34
        xor     eax, eax
-
 
35
        inc     eax
-
 
36
        ret
23
    mov [skin_to_load.stradr],_skin_file_default
37
.noskin:
24
    mov eax,skin_to_load
-
 
25
    call    file_system_lfn
38
        stdcall kernel_free, eax
Line 26... Line -...
26
    pop eax
-
 
27
    popad
-
 
28
    ret
-
 
29
 
-
 
30
skin_to_load:
-
 
31
   			dd 0,0,0
-
 
32
   			dd 64*1024
-
 
33
 .adr  		dd 0
-
 
34
   			db 0
39
        push    2
35
 .stradr	dd 0
40
        pop     eax
36
 
41
        ret
37
 
42
 
38
struct SKIN_HEADER
43
struct SKIN_HEADER
Line 73... Line 78...
73
  .kind  dw ?
78
  .kind  dw ?
74
  .type  dw ?
79
  .type  dw ?
75
  .data  dd ?
80
  .data  dd ?
76
ends
81
ends
Line 77... Line 82...
77
 
82
 
78
load_skin:
-
 
79
        pushad
83
load_default_skin:
80
        mov     [_skinh],22
84
        mov     [_skinh],22
81
        mov     eax,_skin_file
-
 
82
        mov     edx,skin_data
-
 
83
        mov     [edx+SKIN_HEADER.ident],'????'
85
        mov     ebx,_skin_file_default
84
        call    load_skin_file
-
 
85
        cmp     eax,ERROR_SUCCESS
-
 
86
        je      @f
-
 
87
        cmp     eax,ERROR_END_OF_FILE
-
 
88
        jne     .exit
-
 
89
    @@: call    parse_skin_data
-
 
90
  .exit:
-
 
91
        popad
86
        call    read_skin_file
Line 92... Line 87...
92
        ret
87
        ret
93
 
88
 
94
parse_skin_data:
89
parse_skin_data: