diff --git a/programs/develop/tinypad/trunk/build.bat b/programs/develop/tinypad/trunk/build.bat deleted file mode 100644 index 1a205dce6..000000000 --- a/programs/develop/tinypad/trunk/build.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo lang fix en >lang.inc -@fasm -m 16384 tinypad.asm tinypad -@erase lang.inc -@kpack tinypad -@pause diff --git a/programs/system/desktop/trunk/desktop.asm b/programs/system/desktop/trunk/desktop.asm index 10b7ce0e1..503be60eb 100644 --- a/programs/system/desktop/trunk/desktop.asm +++ b/programs/system/desktop/trunk/desktop.asm @@ -10,17 +10,17 @@ ; written by: Marat Zakiyanov aka Mario79, aka Mario ; changes: select path with OpenDialog ;****************************************************************************** - use32 - org 0 - db 'MENUET01' ; identifier - dd 1 ; header version - dd START ; start address - dd I_END ; file size - dd i_end ;28000h ; memory - dd stacktop ; stack pointer - dd skin_info ; parameters - dd cur_dir_path ; path to file - + use32 + org 0 + db 'MENUET01' ; identifier + dd 1 ; header version + dd START ; start address + dd I_END ; file size + dd i_end ; memory + dd stacktop ; stack pointer + dd skin_info ; parameters + dd cur_dir_path ; path to file + include 'lang.inc' include '../../../config.inc' ;for nightbuild include '../../../macros.inc' @@ -71,8 +71,8 @@ struct SKIN_BITMAPS _data dd ? ends - -START: ; start of execution +;--------------------------------------------------------------------- +START: ; start of execution ;--------------------------------------------------------------------- mcall 68,11 @@ -82,11 +82,9 @@ START: ; start of execution load_libraries l_libs_start,end_l_libs ;if return code =-1 then exit, else nornary work -; cmp eax,-1 inc eax test eax,eax jz close - ;--------------------------------------------------------------------- mov edi,filename_area mov esi,start_temp_file_name @@ -109,24 +107,9 @@ load_libraries l_libs_start,end_l_libs test eax,eax jnz @b -;--------------------------------------------------------------------- -; mov esi, param -; cmp byte [esi], 0 -; je @f -; jnz has_param -; mov esi,default_skn -; mov edi,fname -; mov ecx,default_skn.size -; rep movsb -; jmp skin_path_ready -;has_param: -; mov ecx, 256/4 -; mov edi, fname -; rep movsd -; skin_path_ready ;--------------------------------------------------------------------- mov edi,skin_info - cmp byte [edi], 0 + cmp byte [edi], 0 jne skin_path_ready mov esi,default_skin xor eax,eax @@ -139,11 +122,11 @@ load_libraries l_libs_start,end_l_libs skin_path_ready: ;--------------------------------------------------------------------- ;OpenDialog initialisation - push dword OpenDialog_data - call [OpenDialog_Init] + push dword OpenDialog_data + call [OpenDialog_Init] - push dword OpenDialog_data2 - call [OpenDialog_Init] + push dword OpenDialog_data2 + call [OpenDialog_Init] ; prepare for PathShow push dword PathShow_data_1 @@ -152,208 +135,180 @@ skin_path_ready: push dword PathShow_data_2 call [PathShow_prepare] ;--------------------------------------------------------------------- - mov eax,48 ; get current colors - mov ebx,3 - mov ecx,color_table - mov edx,4*10 - mcall - - call load_skin_file.2 - -; mov esi, default_dtp -; mov edi, fname -; mov ecx, default_dtp.size -; rep movsb - + mcall 48,3,color_table,4*10 ; get current colors + call load_skin_file.2 +;--------------------------------------------------------------------- red: - call draw_window ; at first, draw the window - + call draw_window ; at first, draw the window +;--------------------------------------------------------------------- still: + mcall 23,5 ; wait here for event - mov eax,23 ; wait here for event - mov ebx,5 - mcall + dec eax ; redraw request ? + jz red + dec eax ; key in buffer ? + jz key + dec eax ; button in buffer ? + jz button - dec eax ; redraw request ? - jz red - dec eax ; key in buffer ? - jz key - dec eax ; button in buffer ? - jz button + call draw_cursor - call draw_cursor + jmp still +;--------------------------------------------------------------------- +key: ; key + mcall 2 ; just read it and ignore + jmp still +;--------------------------------------------------------------------- +button: ; button + mcall 17 ; get id - jmp still + cmp ah,12 ; load file + jne no_load + call load_file + call draw_window + jmp still +;-------------------------------------- +no_load: + cmp ah,13 ; save file + jne no_save - key: ; key - mov al,2 ; just read it and ignore - mcall - jmp still + call save_file + jmp still +;-------------------------------------- +no_save: + cmp ah,14 ; set 3d buttons + jne no_3d - button: ; button - mov al,17 ; get id - mcall + mcall 48,1,1 + jmp doapply +;-------------------------------------- +no_3d: + cmp ah,15 ; set flat buttons + jne no_flat -; cmp ah,11 ; read string -; jne no_string -; call read_string -; jmp still -; no_string: - - cmp ah,12 ; load file - jne no_load - call load_file - call draw_window - jmp still - no_load: - - cmp ah,13 ; save file - jne no_save - call save_file - jmp still - no_save: - - cmp ah,14 ; set 3d buttons - jne no_3d - mov eax,48 - mov ebx,1 - mov ecx,1 - mcall - jmp doapply - no_3d: - - cmp ah,15 ; set flat buttons - jne no_flat - mcall 48, 1, 0 + mcall 48, 1, 0 +;-------------------------------------- doapply: - mcall 48, 0, 0 - jmp still - no_flat: + mcall 48, 0, 0 + jmp still +;-------------------------------------- +no_flat: + cmp ah,16 ; apply + jne no_apply +;-------------------------------------- +apply_direct: + mcall 48,2,color_table,10*4 + jmp doapply +;-------------------------------------- + no_apply: + cmp ah,17 ; load skin file + jne no_load_skin - cmp ah,16 ; apply - jne no_apply - apply_direct: - mov eax,48 - mov ebx,2 - mov ecx,color_table - mov edx,10*4 - mcall - jmp doapply - no_apply: + call load_skin_file + call draw_window + jmp still +;-------------------------------------- +no_load_skin: + cmp ah,18 ; apply skin + jne no_apply_skin - cmp ah,17 ; load skin file - jne no_load_skin - call load_skin_file - call draw_window - jmp still - no_load_skin: + cmp [skin_info],0 + je no_apply_skin - cmp ah,18 ; apply skin - jne no_apply_skin - cmp [skin_info],0 - je no_apply_skin - mcall 48,8,skin_info - call draw_window - jmp still - no_apply_skin: + mcall 48,8,skin_info + call draw_window + jmp still +;-------------------------------------- +no_apply_skin: + cmp ah,31 + jb no_new_colour - cmp ah,31 - jb no_new_colour - cmp ah,41 - jg no_new_colour - shr eax,8 - sub eax,31 - shl eax,2 - mov ebx,[color] - mov [eax+color_table],ebx - cmp dword[not_packed_area+SKIN_HEADER.ident],'SKIN' - jne @f - mov edi,[not_packed_area+SKIN_HEADER.params] - mov dword[edi+not_packed_area+SKIN_PARAMS.dtp.data+eax],ebx - call draw_skin -@@: call draw_colours - jmp still - no_new_colour: + cmp ah,41 + jg no_new_colour + + shr eax,8 + sub eax,31 + shl eax,2 + mov ebx,[color] + mov [eax+color_table],ebx + cmp dword[not_packed_area+SKIN_HEADER.ident],'SKIN' + jne @f - cmp ah,1 ; terminate - jnz noid1 + mov edi,[not_packed_area+SKIN_HEADER.params] + mov dword[edi+not_packed_area+SKIN_PARAMS.dtp.data+eax],ebx + call draw_skin +;-------------------------------------- +@@: + call draw_colours + jmp still +;-------------------------------------- +no_new_colour: + cmp ah,1 ; terminate + jnz noid1 +;-------------------------------------- close: - or eax,-1 - mcall - noid1: - - jmp still - - + or eax,-1 + mcall +;-------------------------------------- +noid1: + jmp still +;--------------------------------------------------------------------- draw_cursor: + pusha + mcall 37,2 + cmp eax,0 + jne dc1 + popa + ret +;-------------------------------------- +dc1: + mcall 37,1 + mov ebx,eax + shr ebx,16 + mov ecx,eax + and ecx,0xffff + cmp ecx,29 + jbe no_color - pusha - mov eax,37 - mov ebx,2 - mcall + cmp ebx,32 + jbe no_color - cmp eax,0 - jne dc1 - popa - ret + cmp ebx,266 ; CHANGE COLOR + jb no_color - dc1: + cmp ebx,266+20*3 + jg no_color - mov eax,37 - mov ebx,1 - mcall + cmp ecx,30+128 + jge no_color - mov ebx,eax - shr ebx,16 - mov ecx,eax - and ecx,0xffff + cmp ecx,29 + jb no_color - cmp ecx,32 - jbe no_color - cmp ebx,32 - jbe no_color - - cmp ebx,266 ; CHANGE COLOR - jb no_color - cmp ebx,266+20*3 - jg no_color - - cmp ecx,30+128 - jge no_color - cmp ecx,30 - jb no_color - - sub ebx,266 - mov eax,ebx - cdq - mov ebx,20 - div ebx - mov ebx,2 - sub ebx,eax - - add ecx,-30 - not ecx - shl ecx,1 - - mov byte [ebx+color],cl - call draw_color - - popa - ret - - no_color: - - popa - ret + sub ebx,266 + mov eax,ebx + cdq + mov ebx,20 + div ebx + mov ebx,2 + sub ebx,eax + add ecx,-30 + not ecx + shl ecx,1 + mov byte [ebx+color],cl + call draw_color +no_color: + popa + ret ;--------------------------------------------------------------------- load_file: ;--------------------------------------------------------------------- ; invoke OpenDialog mov [OpenDialog_data.type],dword 0 - push dword OpenDialog_data - call [OpenDialog_Start] + push dword OpenDialog_data + call [OpenDialog_Start] cmp [OpenDialog_data.status],1 je .1 ret @@ -364,21 +319,21 @@ load_file: call draw_PathShow ;--------------------------------------------------------------------- - 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 - ret + 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 + ret ;--------------------------------------------------------------------- load_skin_file: ;--------------------------------------------------------------------- ; invoke OpenDialog - push dword OpenDialog_data2 - call [OpenDialog_Start] + push dword OpenDialog_data2 + call [OpenDialog_Start] cmp [OpenDialog_data2.status],1 je .1 ret @@ -390,57 +345,53 @@ load_skin_file: call draw_PathShow ;--------------------------------------------------------------------- .2: - xor eax, eax - mov ebx, read_info2 - 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], file_load_area ; address - mcall 70 + xor eax,eax + mov ebx,read_info2 + 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], file_load_area ; address + mcall 70 - mov esi, file_load_area + mov esi, file_load_area - cmp dword [esi], 'KPCK' - jnz notpacked - cmp dword [esi+4], 32*1024 ; max 32 KBytes - ja doret - push unpack_area - push esi - call unpack - mov esi, unpack_area + cmp dword [esi], 'KPCK' + jnz notpacked + + cmp dword [esi+4], 32*1024 ; max 32 KBytes + ja doret + + push unpack_area + push esi + call unpack + mov esi,unpack_area +;-------------------------------------- notpacked: + cmp [esi+SKIN_HEADER.ident],dword 'SKIN' + jne doret - cmp dword[esi+SKIN_HEADER.ident],'SKIN' - jne doret - - mov edi,not_packed_area - mov ecx,0x8000/4 - rep movsd - -; mov esi,fname -; mov edi,skin_info.fname -; mov ecx,257 -; rep movsb - - mov ebp,not_packed_area - mov esi,[ebp+SKIN_HEADER.params] - add esi,ebp - lea esi,[esi+SKIN_PARAMS.dtp.data] - mov edi,color_table - mov ecx,10 - rep movsd - doret: - -ret + mov edi,not_packed_area + mov ecx,0x8000/4 + rep movsd + mov ebp,not_packed_area + mov esi,[ebp+SKIN_HEADER.params] + add esi,ebp + lea esi,[esi+SKIN_PARAMS.dtp.data] + mov edi,color_table + mov ecx,10 + rep movsd +;-------------------------------------- +doret: + ret ;--------------------------------------------------------------------- save_file: ;--------------------------------------------------------------------- ; invoke OpenDialog mov [OpenDialog_data.type],dword 1 - push dword OpenDialog_data - call [OpenDialog_Start] + push dword OpenDialog_data + call [OpenDialog_Start] cmp [OpenDialog_data.status],1 je .1 ret @@ -451,380 +402,380 @@ save_file: call draw_PathShow ;--------------------------------------------------------------------- - 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 - ret + xor eax,eax + mov ebx,write_info + mov [ebx],dword 2 ; subfunction: write + and [ebx+4],eax ; (reserved) + and [ebx+8],eax ; (reserved) + mov [ebx+12],dword 10*4 ; bytes to write + mov [ebx+16],dword color_table ; address + mcall 70 + ret ;--------------------------------------------------------------------- draw_color: - - pusha - - mov eax,13 - mov ebx,266*65536+60 - mov ecx,170*65536+30 - mov edx,[color] - mcall - -; mov eax,13 - mov ebx,266*65536+60 - mov ecx,200*65536+10 - mov edx,[w_work] - mcall - - mov eax,47 - mov ebx,0+1*256+8*65536 - mov ecx,[color] - mov edx,272*65536+201 - mov esi,[w_work_text] - mcall - - popa - ret + pusha + mcall 13,<266,60>,<170,30>,[color] + mcall ,,<200,10>,[w_work] + mcall 47,<8,0+1*256>,[color],<272,201>,[w_work_text] + popa + ret ;---------------------------------------------------------------------- draw_colours: + pusha + mov esi,color_table + mov ebx,225*65536+32 + mov ecx,32*65536+12 +;-------------------------------------- +newcol: + mov edx,[esi] + mcall 13 + add ecx,18*65536 + add esi,4 + cmp esi,color_table+4*9 + jbe newcol - pusha - - mov esi,color_table - - mov ebx,225*65536+32 - mov ecx,32*65536+12 - newcol: - mov eax,13 - mov edx,[esi] - mcall - add ecx,18*65536 - add esi,4 - cmp esi,color_table+4*9 - jbe newcol - - popa - ret + popa + ret ;---------------------------------------------------------------------- draw_framerect: ; ebx,ecx - push ebx ecx - add bx,[esp+6] - mov cx,[esp+2] - dec ebx - mcall 38 - add cx,[esp] - rol ecx,16 - add cx,[esp] - sub ecx,0x00010001 - mcall - mov ebx,[esp+4] - mov ecx,[esp] - mov bx,[esp+6] - add cx,[esp+2] - dec ecx - mcall - add bx,[esp+4] - rol ebx,16 - add bx,[esp+4] - sub ebx,0x00010001 - mcall - add esp,8 - ret + push ebx ecx + add bx,[esp+6] + mov cx,[esp+2] + dec ebx + mcall 38 + add cx,[esp] + rol ecx,16 + add cx,[esp] + sub ecx,0x00010001 + mcall + mov ebx,[esp+4] + mov ecx,[esp] + mov bx,[esp+6] + add cx,[esp+2] + dec ecx + mcall + add bx,[esp+4] + rol ebx,16 + add bx,[esp+4] + sub ebx,0x00010001 + mcall + add esp,8 + ret ;---------------------------------------------------------------------- find_bitmap: - mov edi,[ebp+SKIN_HEADER.bitmaps] - add edi,ebp - xor ebx,ebx - .lp1: cmp dword[edi],0 - je .lp2 - cmp dword[edi+0],eax - jne @f - mov ebx,[edi+SKIN_BITMAPS._data] - add ebx,ebp - mov ecx,[ebx-2] - mov cx,[ebx+4] - add ebx,8 - .lp2: ret - @@: add edi,8 - jmp .lp1 + mov edi,[ebp+SKIN_HEADER.bitmaps] + add edi,ebp + xor ebx,ebx +;-------------------------------------- +.lp1: + cmp dword[edi],0 + je .lp2 + + cmp dword[edi+0],eax + jne @f +;-------------------------------------- + mov ebx,[edi+SKIN_BITMAPS._data] + add ebx,ebp + mov ecx,[ebx-2] + mov cx,[ebx+4] + add ebx,8 +;-------------------------------------- +.lp2: + ret +;-------------------------------------- +@@: + add edi,8 + jmp .lp1 ;---------------------------------------------------------------------- dec_edx: - sub dl,4 - jnc @f - xor dl,dl - @@: sub dh,4 - jnc @f - xor dh,dh - @@: rol edx,16 - sub dl,4 - jnc @f - xor dl,dl - @@: rol edx,16 - ret + sub dl,4 + jnc @f + + xor dl,dl +;-------------------------------------- +@@: + sub dh,4 + jnc @f + + xor dh,dh +;-------------------------------------- +@@: + rol edx,16 + sub dl,4 + jnc @f + + xor dl,dl +;-------------------------------------- +@@: + rol edx,16 + ret ;---------------------------------------------------------------------- area: .x = 345 .y = 20 .width = 206 .height = 191 - +;-------------------------------------- wnd1: .x = area.x+49 .y = area.y+5 .width = 150 .height = 90 +;-------------------------------------- wnd2: .x = area.x+35 .y = area.y+35 .width = 150 .height = 90 +;-------------------------------------- wnd3: .x = area.x+21 .y = area.y+65 .width = 150 .height = 90 +;-------------------------------------- wnd4: .x = area.x+7 .y = area.y+95 .width = 150 .height = 90 - +;-------------------------------------- virtual at edi+SKIN_PARAMS.dtp.data - dtp system_colors + dtp system_colors end virtual ;---------------------------------------------------------------------- draw_skin: - mcall 13,,,0x00FFFFFF - - mov ebp,not_packed_area - mov edi,[ebp+SKIN_HEADER.params] - add edi,ebp - mpack ebx,wnd1.x,wnd1.width - mpack ecx,wnd1.y,wnd1.height - mov edx,[dtp.frame] - call draw_framerect - mcall 13,,,dword[dtp.work] - - mov eax,38 - mpack ebx,wnd1.x+1,wnd1.x+wnd1.width-2 - mpack ecx,wnd1.y+1,wnd1.y+1 - mov edx,[dtp.grab] - mov esi,20 - @@: mcall - call dec_edx - add ecx,0x00010001 - dec esi - jnz @b - - mov edi,[ebp+SKIN_HEADER.params] - add edi,ebp - mcall 4,,dword[dtp.grab_text],caption_text,caption_text.size - - mcall 8,,,0,[dtp.grab_button] - mcall 4,,dword[dtp.grab_button_text],close_text,close_text.size + mcall 13,,,0x00FFFFFF + mov ebp,not_packed_area + mov edi,[ebp+SKIN_HEADER.params] + add edi,ebp + mpack ebx,wnd1.x,wnd1.width + mpack ecx,wnd1.y,wnd1.height + mov edx,[dtp.frame] + call draw_framerect + mcall 13,,,dword[dtp.work] + mov eax,38 + mpack ebx,wnd1.x+1,wnd1.x+wnd1.width-2 + mpack ecx,wnd1.y+1,wnd1.y+1 + mov edx,[dtp.grab] + mov esi,20 +;-------------------------------------- +@@: + mcall + call dec_edx + add ecx,0x00010001 + dec esi + jnz @b + mov edi,[ebp+SKIN_HEADER.params] + add edi,ebp + mcall 4,,dword[dtp.grab_text],caption_text,caption_text.size + mcall 8,,,0,[dtp.grab_button] + mcall 4,,dword[dtp.grab_button_text],close_text,close_text.size ;---------------------------------------------------------------------- + mov edi,[ebp+SKIN_HEADER.params] + add edi,ebp + mpack ebx,wnd2.x,wnd2.width + mpack ecx,wnd2.y,wnd2.height + mov edx,[dtp.frame] + shr edx,1 + and edx,0x007F7F7F + call draw_framerect + mpack ebx,wnd2.x+4,wnd2.width-8 + mpack ecx,wnd2.y+4,wnd2.height-8 + call draw_framerect + mcall 13,,,[dtp.frame] + add ecx,(wnd2.height-5)*65536 + mcall + mcall ,, + add ebx,(wnd2.width-5)*65536 + mcall + mcall ,,,dword[dtp.work] - mov edi,[ebp+SKIN_HEADER.params] - add edi,ebp - mpack ebx,wnd2.x,wnd2.width - mpack ecx,wnd2.y,wnd2.height - mov edx,[dtp.frame] - shr edx,1 - and edx,0x007F7F7F - call draw_framerect - mpack ebx,wnd2.x+4,wnd2.width-8 - mpack ecx,wnd2.y+4,wnd2.height-8 - call draw_framerect - mcall 13,,,[dtp.frame] - add ecx,(wnd2.height-5)*65536 - mcall - mcall ,, - add ebx,(wnd2.width-5)*65536 - mcall - mcall ,,,dword[dtp.work] - - mov eax,38 - mpack ebx,wnd2.x+4,wnd2.x+wnd2.width-5 - mpack ecx,wnd2.y+4,wnd2.y+4 - mov edx,[dtp.grab] - mov esi,16 - @@: mcall - call dec_edx - add ecx,0x00010001 - dec esi - jnz @b - - mov edi,[ebp+SKIN_HEADER.params] - add edi,ebp - mcall 4,,dword[dtp.grab_text],caption_text,caption_text.size - - mcall 8,,,0,[dtp.grab_button] - mcall 4,,dword[dtp.grab_button_text],close_text,close_text.size + mov eax,38 + mpack ebx,wnd2.x+4,wnd2.x+wnd2.width-5 + mpack ecx,wnd2.y+4,wnd2.y+4 + mov edx,[dtp.grab] + mov esi,16 +;-------------------------------------- +@@: + mcall + call dec_edx + add ecx,0x00010001 + dec esi + jnz @b + mov edi,[ebp+SKIN_HEADER.params] + add edi,ebp + mcall 4,,dword[dtp.grab_text],caption_text,caption_text.size + mcall 8,,,0,[dtp.grab_button] + mcall 4,,dword[dtp.grab_button_text],close_text,close_text.size ;---------------------------------------------------------------------- + mov edi,[ebp+SKIN_HEADER.params] + add edi,ebp + mpack ebx,wnd3.x,wnd3.width + mpack ecx,wnd3.y,wnd3.height + mov edx,[edi+SKIN_PARAMS.colors_1.outer] + call draw_framerect + mpack ebx,wnd3.x+4,wnd3.width-8 + mpack ecx,wnd3.y+4,wnd3.height-8 + mov edx,[edi+SKIN_PARAMS.colors_1.inner] + call draw_framerect + mcall 13,,,[edi+SKIN_PARAMS.colors_1.frame] + add ecx,(wnd3.height-5)*65536 + mcall + mcall ,, + add ebx,(wnd3.width-5)*65536 + mcall + mcall ,,,dword[dtp.work] - mov edi,[ebp+SKIN_HEADER.params] - add edi,ebp - mpack ebx,wnd3.x,wnd3.width - mpack ecx,wnd3.y,wnd3.height - mov edx,[edi+SKIN_PARAMS.colors_1.outer] - call draw_framerect - mpack ebx,wnd3.x+4,wnd3.width-8 - mpack ecx,wnd3.y+4,wnd3.height-8 - mov edx,[edi+SKIN_PARAMS.colors_1.inner] - call draw_framerect - mcall 13,,,[edi+SKIN_PARAMS.colors_1.frame] - add ecx,(wnd3.height-5)*65536 - mcall - mcall ,, - add ebx,(wnd3.width-5)*65536 - mcall - mcall ,,,dword[dtp.work] + mov eax,0x00000001 ; left, inactive + call find_bitmap + mcall 7,,, - mov eax,0x00000001 ; left, inactive - call find_bitmap - mcall 7,,, + pushd [ebx-8] + mov eax,0x00000003 ; base, inactive + call find_bitmap + pop edx + mov esi,wnd3.x+wnd3.width-1 + sub esi,edx + shl edx,16 + add edx,wnd3.x*65536+wnd3.y + mcall 7 +;-------------------------------------- +@@: + rol edx,16 + add dx,[ebx-8] + cmp dx,si + ja @f - pushd [ebx-8] - mov eax,0x00000003 ; base, inactive - call find_bitmap - pop edx - mov esi,wnd3.x+wnd3.width-1 - sub esi,edx - shl edx,16 - add edx,wnd3.x*65536+wnd3.y - mcall 7 - @@: rol edx,16 - add dx,[ebx-8] - cmp dx,si - ja @f - rol edx,16 - mcall 7 - jmp @b - @@: - - mov eax,0x00000002 ; oper, inactive - call find_bitmap - mov edx,ecx - shr edx,16 - neg edx - shl edx,16 - add edx,(wnd3.x+wnd3.width)*65536+wnd3.y - mcall 7 - - mov ebp,not_packed_area - mov edi,[ebp+SKIN_HEADER.params] - add edi,ebp - mov eax,dword[edi+SKIN_PARAMS.margin.left-2] - mov ax,word[edi+SKIN_PARAMS.skin_height] - sub ax,[edi+SKIN_PARAMS.margin.bottom] - shr ax,1 - add ax,[edi+SKIN_PARAMS.margin.top] - add ax,-4 - push eax - lea ebx,[eax+wnd3.x*65536+wnd3.y] - mcall 4,,dword[dtp.grab_text],caption_text,caption_text.size + rol edx,16 + mcall 7 + jmp @b +;-------------------------------------- +@@: + mov eax,0x00000002 ; oper, inactive + call find_bitmap + mov edx,ecx + shr edx,16 + neg edx + shl edx,16 + add edx,(wnd3.x+wnd3.width)*65536+wnd3.y + mcall 7 + mov ebp,not_packed_area + mov edi,[ebp+SKIN_HEADER.params] + add edi,ebp + mov eax,dword[edi+SKIN_PARAMS.margin.left-2] + mov ax,word[edi+SKIN_PARAMS.skin_height] + sub ax,[edi+SKIN_PARAMS.margin.bottom] + shr ax,1 + add ax,[edi+SKIN_PARAMS.margin.top] + add ax,-4 + push eax + lea ebx,[eax+wnd3.x*65536+wnd3.y] + mcall 4,,dword[dtp.grab_text],caption_text,caption_text.size ;--------------------------------------------------------- + mov edi,[ebp+SKIN_HEADER.params] + add edi,ebp + mpack ebx,wnd4.x,wnd4.width + mpack ecx,wnd4.y,wnd4.height + mov edx,[edi+SKIN_PARAMS.colors.outer] + call draw_framerect + mpack ebx,wnd4.x+4,wnd4.width-8 + mpack ecx,wnd4.y+4,wnd4.height-8 + mov edx,[edi+SKIN_PARAMS.colors.inner] + call draw_framerect + mcall 13,,,[edi+SKIN_PARAMS.colors.frame] + add ecx,(wnd4.height-5)*65536 + mcall + mcall ,, + add ebx,(wnd4.width-5)*65536 + mcall + mcall ,,,dword[dtp.work] - mov edi,[ebp+SKIN_HEADER.params] - add edi,ebp - mpack ebx,wnd4.x,wnd4.width - mpack ecx,wnd4.y,wnd4.height - mov edx,[edi+SKIN_PARAMS.colors.outer] - call draw_framerect - mpack ebx,wnd4.x+4,wnd4.width-8 - mpack ecx,wnd4.y+4,wnd4.height-8 - mov edx,[edi+SKIN_PARAMS.colors.inner] - call draw_framerect - mcall 13,,,[edi+SKIN_PARAMS.colors.frame] - add ecx,(wnd4.height-5)*65536 - mcall - mcall ,, - add ebx,(wnd4.width-5)*65536 - mcall - mcall ,,,dword[dtp.work] + mov eax,0x00010001 ; left, inactive + call find_bitmap + mcall 7,,, - mov eax,0x00010001 ; left, inactive - call find_bitmap - mcall 7,,, + pushd [ebx-8] + mov eax,0x00010003 ; base, inactive + call find_bitmap + pop edx + mov esi,wnd4.x+wnd4.width-1 + sub esi,edx + shl edx,16 + add edx,wnd4.x*65536+wnd4.y + mcall 7 +;-------------------------------------- +@@: + rol edx,16 + add dx,[ebx-8] + cmp dx,si + ja @f - pushd [ebx-8] - mov eax,0x00010003 ; base, inactive - call find_bitmap - pop edx - mov esi,wnd4.x+wnd4.width-1 - sub esi,edx - shl edx,16 - add edx,wnd4.x*65536+wnd4.y - mcall 7 - @@: rol edx,16 - add dx,[ebx-8] - cmp dx,si - ja @f - rol edx,16 - mcall 7 - jmp @b - @@: - - mov eax,0x00010002 ; oper, inactive - call find_bitmap - mov edx,ecx - shr edx,16 - neg edx - shl edx,16 - add edx,(wnd4.x+wnd4.width)*65536+wnd4.y - mcall 7 - - mov ebp,not_packed_area - mov edi,[ebp+SKIN_HEADER.params] - add edi,ebp - pop eax - lea ebx,[eax+wnd4.x*65536+wnd4.y] - mcall 4,,dword[dtp.grab_text],caption_text,caption_text.size + rol edx,16 + mcall 7 + jmp @b +;-------------------------------------- +@@: + mov eax,0x00010002 ; oper, inactive + call find_bitmap + mov edx,ecx + shr edx,16 + neg edx + shl edx,16 + add edx,(wnd4.x+wnd4.width)*65536+wnd4.y + mcall 7 + mov ebp,not_packed_area + mov edi,[ebp+SKIN_HEADER.params] + add edi,ebp + pop eax + lea ebx,[eax+wnd4.x*65536+wnd4.y] + mcall 4,,dword[dtp.grab_text],caption_text,caption_text.size ;---------------------------------------------------------------------- + mov edi,[ebp+SKIN_HEADER.buttons] + add edi,ebp +;-------------------------------------- +.lp1: + cmp dword[edi],0 + je .lp2 - mov edi,[ebp+SKIN_HEADER.buttons] - add edi,ebp - .lp1: cmp dword[edi],0 - je .lp2 - mov ebx,dword[edi+SKIN_BUTTONS.left-2] - mov bx,[edi+SKIN_BUTTONS.width] - mov ecx,dword[edi+SKIN_BUTTONS.top-2] - mov cx,[edi+SKIN_BUTTONS.height] - add ebx,(wnd4.x+wnd4.width)*65536 - add ecx,wnd4.y*65536 - dec ebx - dec ecx - mcall 8,,,0x40000000 - add edi,12 - jmp .lp1 - .lp2: + mov ebx,dword[edi+SKIN_BUTTONS.left-2] + mov bx,[edi+SKIN_BUTTONS.width] + mov ecx,dword[edi+SKIN_BUTTONS.top-2] + mov cx,[edi+SKIN_BUTTONS.height] + add ebx,(wnd4.x+wnd4.width)*65536 + add ecx,wnd4.y*65536 + dec ebx + dec ecx + mcall 8,,,0x40000000 + add edi,12 + jmp .lp1 +;-------------------------------------- +.lp2: + mov edi,[ebp+SKIN_HEADER.params] + add edi,ebp + mpack ebx,wnd4.x+10,wnd4.y+10 + add bx,word[edi+SKIN_PARAMS.skin_height] + mcall 4,,[dtp.work_text],window_text,window_text.size - mov edi,[ebp+SKIN_HEADER.params] - add edi,ebp - mpack ebx,wnd4.x+10,wnd4.y+10 - add bx,word[edi+SKIN_PARAMS.skin_height] - mcall 4,,[dtp.work_text],window_text,window_text.size + mov ecx,[edi+SKIN_PARAMS.skin_height] + shl ecx,16 + add ecx,(wnd4.y+8)*65536+10 + mcall 13,,,[dtp.work_graph] - mov ecx,[edi+SKIN_PARAMS.skin_height] - shl ecx,16 - add ecx,(wnd4.y+8)*65536+10 - mcall 13,,,[dtp.work_graph] + add ecx,25*65536+8 + mcall 8,,,0,[dtp.work_button] - add ecx,25*65536+8 - mcall 8,,,0,[dtp.work_button] - - shr ecx,16 - mov bx,cx - add ebx,0x00060006 - mcall 4,,[dtp.work_button_text],button_text,button_text.size - - ret + shr ecx,16 + mov bx,cx + add ebx,0x00060006 + mcall 4,,[dtp.work_button_text],button_text,button_text.size + ret ;--------------------------------------------------------------------- draw_PathShow: pusha @@ -858,7 +809,7 @@ draw_window: mov eax,[procinfo+70] ;status of window test eax,100b jne .end - + if lang eq ru load_w = (5*2+6*9) save_w = (5*2+6*9) @@ -872,8 +823,6 @@ else end if ; LOAD BUTTON -; mov ebx,15*65536+load_w -; mov ecx,(35+18*12)*65536+14 mcall 8,<15,load_w>,<35+18*12,14>,12,[w_work_button] ; SAVE BUTTON add ebx,(load_w+2)*65536-load_w+save_w @@ -909,7 +858,7 @@ end if mov ebx,(15+(load_w+save_w+2-t3.size*6)/2)*65536+(35+18*12+4) mcall ,,,t3,t3.size - mov eax,38 ; R G B COLOR GLIDES + mov eax,38 ; R G B COLOR GLIDES mov ebx,266*65536+285 mov ecx,30*65536+30 mov edx,0xff0000 @@ -931,7 +880,7 @@ end if ;----------------------------------- call draw_color - mov edx,31 ; BUTTON ROW + mov edx,31 ; BUTTON ROW mov ebx,15*65536+200 mov ecx,30*65536+14 mov esi,[w_work_button] @@ -945,7 +894,7 @@ end if cmp edx,40 jbe .newb ;----------------------------------- - mov ebx,15*65536+34 ; ROW OF TEXTS + mov ebx,15*65536+34 ; ROW OF TEXTS mov ecx,[w_work_button_text] mov edx,text mov esi,32 @@ -1246,28 +1195,29 @@ communication_area_name: db 'FFFFFFFF_open_dialog2',0 open_dialog_path: if __nightbuild eq yes - db '/sys/MANAGERS/opendial',0 + db '/sys/MANAGERS/opendial',0 else - db '/sys/File Managers/opendial',0 + db '/sys/File Managers/opendial',0 end if communication_area_default_pach: db '/sys',0 Filter: -dd Filter.end - Filter + dd Filter.end - Filter .1: -db 'DTP',0 + db 'DTP',0 .end: -db 0 + db 0 Filter2: -dd Filter.end - Filter + dd Filter.end - Filter .1: -db 'SKN',0 + db 'SKN',0 .end: -db 0 + db 0 -start_temp_file_name: db 'default.dtp',0 +start_temp_file_name: + db 'default.dtp',0 default_skin: db '/sys/default.skn',0 @@ -1322,7 +1272,7 @@ w_work_text dd ? w_work_graph dd ? color_table: - times 10 dd ? + times 10 dd ? ;--------------------------------------------------------------------- align 4 cur_dir_path: @@ -1331,9 +1281,6 @@ cur_dir_path: library_path: rb 4096 ;--------------------------------------------------------------------- -;fname_buf: -; rb 4096 -;--------------------------------------------------------------------- temp_dir_pach: rb 4096 ;---------------------------------------------------------------------