Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 484 → Rev 483

/programs/system/desktop/trunk/unpacker.inc
File deleted
/programs/system/desktop/trunk/kglobals.inc
File deleted
/programs/system/desktop/trunk/desktop.asm
15,13 → 15,11
dd START ; start address
dd I_END ; file size
dd 28000h ; memory
dd 10000h ; stack pointer
dd 28000h ; stack pointer (0x10000+ - work area for os)
dd 0,0 ; parameters, reserved
 
include 'lang.inc'
include 'macros.inc'
include 'kglobals.inc'
include 'unpacker.inc'
;******************************************************************************
 
 
143,13 → 141,16
mov ebx,1
mov ecx,1
int 0x40
jmp doapply
mov eax,48
mov ebx,0
mov ecx,0
int 0x40
jmp still
no_3d:
 
cmp ah,15 ; set flat buttons
jne no_flat
mcall 48, 1, 0
doapply:
mcall 48, 0, 0
jmp still
no_flat:
162,7 → 163,10
mov ecx,color_table
mov edx,10*4
int 0x40
jmp doapply
mov eax,48
mov ebx,0
mov ecx,0
int 0x40
no_apply:
 
cmp ah,17 ; load skin file
271,50 → 275,43
 
 
load_file:
xor eax, eax
mov ebx, read_info
mov dword [ebx], eax ; subfunction: read
mov dword [ebx+4], eax ; offset (low dword)
mov dword [ebx+8], eax ; offset (high dword)
mov dword [ebx+12], 40 ; read colors file: 4*10 bytes
mov dword [ebx+16], color_table ; address
mcall 70
pushad
 
mov [read_info.mode] ,0
mov [read_info.start_block],0
mov [read_info.blocks] ,1
mov [read_info.address] ,color_table
mov [read_info.workarea] ,0x10000
mcall 58, read_info
 
; call draw_colours
 
popad
ret
 
load_skin_file:
xor eax, eax
mov ebx, read_info
mov dword [ebx], eax ; subfunction: read
mov dword [ebx+4], eax ; offset (low dword)
mov dword [ebx+8], eax ; offset (high dword)
mov dword [ebx+12], 32*1024 ; read: max 32 KBytes
mov dword [ebx+16], 0x10000 ; address
mcall 70
pushad
 
mov esi, 0x10000
mov [read_info.mode] ,0
mov [read_info.start_block],0
mov [read_info.blocks] ,64
mov [read_info.address] ,0x20000
mov [read_info.workarea] ,0x10000
mcall 58, read_info
 
cmp dword [esi], 'KPCK'
jnz notpacked
cmp dword [esi+4], 32*1024 ; max 32 KBytes
ja doret
push 0x20000
push esi
call unpack
mov esi, 0x20000
notpacked:
cmp dword[0x20000+SKIN_HEADER.ident],'SKIN'
jne @f
 
cmp dword[esi+SKIN_HEADER.ident],'SKIN'
jne doret
mov esi,fname
mov edi,skin_info.fname
mov ecx,257
rep movsb
 
mov esi,0x20000
mov edi,0x18000
mov ecx,0x8000/4
rep movsd
 
mov esi,fname
mov edi,skin_info.fname
mov ecx,257
rep movsb
 
mov ebp,0x18000
mov esi,[ebp+SKIN_HEADER.params]
add esi,ebp
322,21 → 319,25
mov edi,color_table
mov ecx,10
rep movsd
doret:
@@:
 
popad
ret
 
 
save_file:
mov ebx, write_info
mov dword [ebx], 2 ; subfunction: write
and dword [ebx+4], 0 ; (reserved)
and dword [ebx+8], 0 ; (reserved)
mov dword [ebx+12], 10*4 ; bytes to write
mov dword [ebx+16], color_table ; address
mcall 70
pushad
 
mov [write_info.mode] ,1
mov [write_info.bytes2write],10*4
mov [write_info.address] ,color_table
mov [write_info.workarea] ,0x10000
mcall 58, write_info
 
popad
ret
 
 
read_string:
 
pusha
356,7 → 357,7
int 0x40
cmp eax,2
jne read_done
; mov eax,2
mov eax,2
int 0x40
shr eax,8
cmp eax,13
380,7 → 381,8
 
read_done:
 
mov ecx, fname+88
mov ecx, fname
add ecx, 88
sub ecx, edi
mov eax, 0
cld
1039,12 → 1041,8
 
color dd 0
 
IncludeIGlobals
 
I_END:
 
IncludeUGlobals
 
read_info:
.mode dd ? ; read
.start_block dd ? ; first block