From c4b94dcb7848ec4cee4ab6d6a0bf120a41c30726 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sat, 11 Apr 2020 17:56:21 +0000 Subject: [PATCH] HA Config 0.3.9: bigger font git-svn-id: svn://kolibrios.org@7776 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/other/ha/HACONFIG.ASM | 999 +++++++-------------------------- programs/other/ha/ReadMe.txt | 5 - 2 files changed, 218 insertions(+), 786 deletions(-) diff --git a/programs/other/ha/HACONFIG.ASM b/programs/other/ha/HACONFIG.ASM index 94ce50dead..d3452d2c23 100644 --- a/programs/other/ha/HACONFIG.ASM +++ b/programs/other/ha/HACONFIG.ASM @@ -2,7 +2,7 @@ ; Hot Angles Config ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Compile with FASM -; Version 0.3.8: Oct 14, 2018 +; Version 0.3.9: Apr 11, 2020 ; Copyright (c) 2018, Efremenkov Sergey aka TheOnlyMirage ; All rights reserved. @@ -30,7 +30,7 @@ format binary as "" ; Binary file format without extension use32 ; Tell compiler to use 32 bit instructions org 0 ; the base address of code, always 0x0 -; +; db 'MENUET01' dd 1 dd START @@ -55,8 +55,8 @@ KMENUITEM_SEPARATOR equ 2 Otstup = 30 START: - call copyKill ; - mcall 68, 11 ; + call copyKill ; + mcall 68, 11 ; ;mcall 48,3,sc,sizeof.system_colors ; mov eax,48 ; @@ -69,8 +69,8 @@ START: or eax, eax jnz exit - mov eax,40 ; - mov ebx,0x27 ; , , , (- - ; ) + mov eax,40 ; + mov ebx,0x27 ; , , , (- - ; ) mcall load_libraries l_libs_start,load_lib_end ; () @@ -90,10 +90,8 @@ START: stdcall [ksubmenu_add], [modeMenu], eax stdcall [kmenuitem_new], KMENUITEM_SUBMENU, valueModeMenu1, [modeMenu] - call loadConfig ; , - - call defaultElems ; - call resizeElems - call draw_window ; + call loadConfig ; , - + call draw_window ; ; event_wait: @@ -112,16 +110,17 @@ event_wait: je button ; Expl.: User has pressed one of the ; applications buttons. - invoke edit_box_mouse, editLU ; editBox' + invoke edit_box_mouse, editLU ; editBox' invoke edit_box_mouse, editLD invoke edit_box_mouse, editRU invoke edit_box_mouse, editRD + ;stdcall [kmainmenu_dispatch_cursorevent], [modeMenu] ; invoke edit_box_mouse, editRadius jmp event_wait -red: ; +red: ; call draw_window jmp event_wait @@ -143,7 +142,7 @@ key: ; Keypress event handler jne .next mov byte[hkSymbol], ah - push eax ecx esi ; + push eax ecx esi ; shr eax, 16 mov byte[keyscan], al mov ecx, 0 @@ -163,7 +162,7 @@ key: ; Keypress event handler ;je @f jmp @b @@: - ; + ; mov dword[keystr.size], ecx pop esi ecx eax @@ -173,7 +172,7 @@ key: ; Keypress event handler ;jne @f ;cmp ah, 0 ;jne @f - ; + ; ;shr eax, 16 ;bt eax, 0 ;left shift ;jne @f @@ -194,7 +193,7 @@ exit: noclose: cmp ah, 2 ; "" jne @f ;butend - call applyButton ; + call applyButton ; jmp event_wait @@: cmp ah, 4 @@ -227,13 +226,11 @@ noclose: mcall 9, pi, -1 ;get window coord mov eax, dword[pi+34] - add eax, Otstup ;buttonModeX ;+ 5 + add eax, buttonModeX ;+ 5 mov word[coordModeMenu.x], ax mov eax, dword[pi+38] - add ax, word[elem.butModeY] - add ax, word[elem.butDialHeight] - dec ax ;add eax, buttonModeY + 13 ;17 + add eax, buttonModeY + 13 ;17 mov word[coordModeMenu.y], ax stdcall [ksubmenu_draw], [modeMenu], coordModeMenu @@ -270,10 +267,10 @@ butend: -; +; fileName: db 'SETTINGS/HOTANGLES.CFG', 0 -; / +; / createFile: .func dd 2 ; .re dd 0, 0 ; @@ -282,7 +279,7 @@ createFile: .path db 0 .path_adr dd fileName ; -; +; defaultDataForConfig db 121,13,10,'/rd/1/HACONFIG',13,10,'/rd/1/HACONFIG',13,10,'/rd/1/HACONFIG',13,10,'/rd/1/HACONFIG',13,10,'Space',13,10,'57',13,10,'10',13,10,'s',13,10 defaultDataSize = 85 ;48+19+4 @@ -294,10 +291,10 @@ copyParam: ; cmp ecx, 0 ; ? jne copyParam.copy ; , ( ) - mov byte[eax], '-' ; , '-' + mov byte[eax], '-' ; , '-' inc eax ;jmp copyParam.copyEnd ; - ; + ; .copy: ; cmp ecx, 0 @@ -313,7 +310,7 @@ copyParam: ; ret -addPerenos: ; +addPerenos: ; mov byte[eax], 13 inc eax mov byte[eax], 10 @@ -327,7 +324,7 @@ applyButton: ;mov dword[createFile.size], defaultDataSize ; - mov ecx, 9*2+1 ;1 9 ( 13, 10) + mov ecx, 9*2+1 ;1 9 ( 13, 10) add ecx, dword[editLU.size] ; add ecx, dword[editLD.size] add ecx, dword[editRU.size] @@ -335,9 +332,14 @@ applyButton: add ecx, dword[editRadius.size] add ecx, dword[hkSize] ; add ecx, dword[keystr.size] ; - inc ecx ; 1 + inc ecx ; 1 - ; , , +1 + ;cmp dword[keystr.size], 3 + ;jbe @f + ;mcall -1 + ;@@: + + ; , , +1 cmp dword[editLU.size], 0 jne @f inc ecx @@ -356,12 +358,12 @@ applyButton: @@: ; ecx - mov dword[createFile.size], ecx ; / - mcall 68, 12, ecx ; - mov dword[createFile.data_adr], eax ; + mov dword[createFile.size], ecx ; / + mcall 68, 12, ecx ; + mov dword[createFile.data_adr], eax ; ; : - push ebx ; + push ebx ; mov bl, byte[mode] mov byte[eax], bl pop ebx @@ -372,31 +374,31 @@ applyButton: push esi ebx call UpdateEditsSizes ; edit' - mov esi, dataBuffer.1 - mov ebx, dataBuffer.size1 + mov esi, dataBuffer.1 ;editLU.text + mov ebx, dataBuffer.size1 ;editLU.size call copyParam - call addPerenos ; + call addPerenos ; mov esi, dataBuffer.2 mov ebx, dataBuffer.size2 call copyParam - call addPerenos ; + call addPerenos ; mov esi, dataBuffer.3 mov ebx, dataBuffer.size3 call copyParam - call addPerenos ; + call addPerenos ; mov esi, dataBuffer.4 mov ebx, dataBuffer.size4 call copyParam - call addPerenos ; + call addPerenos ; - ; + ; call saveKey call addPerenos - ; + ; mov esi, keystr.data ; keystr xor ebx, ebx @@: @@ -412,15 +414,15 @@ applyButton: @@: call addPerenos - ; - ;!!! , ( '-') + ; + ;!!! , ( '-') mov esi, radiusBuffer.data mov ebx, editRadius.size ;radiusBuffer.size call copyParam call addPerenos - ; - push ebx ; + ; + push ebx ; mov bl, byte[sizeStyle] mov byte[eax], bl pop ebx @@ -436,7 +438,7 @@ applyButton: je .end ; !!! .end: - mcall 68, 13, dword[createFile.data_adr] ; + mcall 68, 13, dword[createFile.data_adr] ; call finishHotAnglesApp ; @HOTANGLES call loadConfig ; call draw_window ; @@ -471,11 +473,11 @@ compareBytes2: finishHotAnglesApp: - ; + ; push eax ebx ecx esi edi - ;, : - mov esi, startAppData.file_name ; - - mov edi, buf ; - + ;, : + mov esi, startAppData.file_name ; - + mov edi, buf ; - add edi, 10 mov ecx, 1 @@ -483,7 +485,7 @@ finishHotAnglesApp: mcall 9, buf, ecx ; mov dword[slotMax], eax - call compareBytes2 ; + call compareBytes2 ; cmp eax, 0 jne finishHotAnglesApp.next ; , @@ -541,26 +543,26 @@ fileAdr dd 0 loadConfig: push eax ebx ecx edx mcall 68, 27, fileName ; - mov dword[fileAdr], eax ; + mov dword[fileAdr], eax ; cmp eax, 0 je loadConfig.default ; , ; , edx - cmp edx, 0 ; , , + cmp edx, 0 ; , , je loadConfig.default .start: - add edx, eax ; edx - . + add edx, eax ; edx - . .chStart: push ebx mov bl, byte[eax] - cmp bl, 48 ; , 'n' ( ) + cmp bl, 48 ; , 'n' ( ) jb loadConfig.checkN cmp bl, 51 ja loadConfig.checkN mov byte[mode], bl ; - jmp loadConfig.modeEnd ; + jmp loadConfig.modeEnd ; .checkN: cmp bl, 'n' ; n - "" jne @f @@ -573,19 +575,19 @@ loadConfig: jmp loadConfig.modeEnd @@: mov byte[mode], 48 ;'0' - ;mov byte[mode], 49 ;'1' + ;mov byte[mode], 49 ;'1' .modeEnd: pop ebx - ;jmp loadConfig.end ; + ;jmp loadConfig.end ; ; push edi esi ecx ebx eax - ; + ; mov edi, dataBuffer.1 mov esi, dataBuffer.size1 - ;ecx - + ;ecx - .block: - xor ecx, ecx ; + xor ecx, ecx ; inc eax cmp byte[eax], 10 ; 10 13, je loadConfig.block ; @@ -597,11 +599,11 @@ loadConfig: mov byte[edi], bl inc edi inc eax - inc ecx ; + inc ecx ; - ; : 10, 13, 0 file end -.while: ; - cmp eax, edx ; , !!! + ; : 10, 13, 0 file end +.while: ; + cmp eax, edx ; , !!! ja loadConfig.ura cmp byte[eax], 10 je loadConfig.ura @@ -619,12 +621,12 @@ loadConfig: jae loadConfig.ura jmp loadConfig.while .ura: - mov byte[edi], 0 ; 0 - mov dword[esi], ecx ; + mov byte[edi], 0 ; 0 + mov dword[esi], ecx ; add esi, 4 ; sub edi, ecx ; add edi, 512 - ;xor ecx, ecx ; + ;xor ecx, ecx ; cmp edi, dataBuffer.size1 ; ( ), jb loadConfig.block @@ -636,7 +638,7 @@ loadConfig: call readScanKey call gotoEndString - call readOptRadius ; mode 3 + call readOptRadius ; mode 3 call gotoEndString call readOptSize ; call gotoEndString @@ -652,51 +654,53 @@ loadConfig: mov ecx, dword[fileAdr] ; , cmp ecx, 0 je @f - mcall 68, 13, ecx ; + mcall 68, 13, ecx ; @@: - call updateParams ; - call setMySize ; + call updateParams ; + call setMySize ; pop edx ecx ebx eax ret setMySize: push eax - ; mysize sizeStyle + ; mysize sizeStyle cmp byte[sizeStyle], '0' jb @f cmp byte[sizeStyle], '7' ja @f - mov eax, 0 ; , + mov eax, 0 ; , mov al, byte[sizeStyle] sub al, '0' jmp .end @@: cmp byte[sizeStyle], 'a' je .auto - cmp byte[sizeStyle], 'x' - je .x -.system: ; : s - - push ebx ecx edx - mcall 48, 11 ; - ; eax - - mov ebx, 9 ;temp fix - and -1 - mov edx, 0 - div ebx - pop edx ecx ebx - - cmp eax, 0 - je .end - cmp eax, 7 - jae .size7 - dec eax - ;mov eax, 0 ;test + ;cmp byte[sizeStyle], 's' + ;je .system +.system: ; : s - +; push ebx ecx + ;!!! +; mov eax, 9 +; mcall 48, 11 ; + ;eax - +; mov ecx, eax +; push eax +; mcall 48, 12, ecx ; +; pop eax +; pop ecx ebx + ;temp fix - and -1 +; push ebx edx +; mov ebx, 9 + ;div ebx +; pop edx ebx + ;cmp eax, 0 + ;je .end + ;dec eax + mov eax, 0 ;xor eax, eax ;test temp jmp .end -.x: - mov byte[sizeStyle], 'x' - mov eax, 0 - jmp .end -.auto: ;a - +.auto: ;a - + ;!!! mcall 14 push ebx xor ebx, ebx @@ -707,24 +711,16 @@ setMySize: mov ax, bx .a: pop ebx - cmp ax, 1300 ;1919 ; 0 1 + cmp ax, 1919 ; 0 1 jb .size0 - cmp ax, 1899 ;919 - jb .x cmp ax, 2047 jb .size1 cmp ax, 4095 jb .size2 cmp ax, 8191 jb .size3 - cmp ax, 16383 - jb .size4 - cmp ax, 32767 - jb .size5 - cmp ax, 65535 - jb .size6 - jmp .size7 + jmp .size4 .size0: mov eax, 0 @@ -761,7 +757,7 @@ setMySize: readScanKey: ; - cmp eax, edx ; , + cmp eax, edx ; , ja .default ; cmp byte[eax], 10 je @f @@ -807,7 +803,7 @@ readScanKey: readOptKey: ;1;3;4;5 - space or shift ; - cmp eax, edx ; , + cmp eax, edx ; , ja .default ; cmp byte[eax], 10 je @f @@ -840,7 +836,7 @@ readOptKey: ;1;3;4;5 - space or shift mov dword[hkSize], 3 jmp .end .notAlt: - ;, 1 , + ;, 1 , cmp byte[eax+1], 10 je .oneSymb cmp byte[eax+1], 0 @@ -849,9 +845,9 @@ readOptKey: ;1;3;4;5 - space or shift je .oneSymb jmp .default .oneSymb: - ;, !!! + ;, !!! - ; + ; push ebx ;xor ebx, ebx mov bl, byte[eax] @@ -873,7 +869,7 @@ readOptKey: ;1;3;4;5 - space or shift ; gotoEndString: - cmp eax, edx ; , + cmp eax, edx ; , ja @f ; cmp byte[eax], 10 je @f @@ -889,7 +885,7 @@ gotoEndString: readOptRadius: ; - cmp eax, edx ; , + cmp eax, edx ; , ja .default ; cmp byte[eax], 10 je @f @@ -906,7 +902,7 @@ readOptRadius: mov byte[radiusBuffer.data+ecx], bl inc ecx inc eax - cmp eax, edx ; , + cmp eax, edx ; , ja .readEnd cmp byte[eax], 10 je .readEnd @@ -937,7 +933,7 @@ readOptRadius: readOptSize: ; - cmp eax, edx ; , + cmp eax, edx ; , ja .default ; cmp byte[eax], 10 je @f @@ -946,13 +942,11 @@ readOptSize: cmp byte[eax], 13 je @f - ;, : 1-7, a, s + ;, : 1-7, a, s cmp byte[eax], 'a' je .setValue cmp byte[eax], 's' je .setValue - cmp byte[eax], 'x' - je .setValue cmp byte[eax], '0' je .setValue cmp byte[eax], '1' @@ -1045,14 +1039,14 @@ buf db 1024 dup(0) copyKill: push eax ebx ecx esi edi - ; + ; mcall 9, buf, -1 mov eax, dword[buf+30] mov dword[selfPID], eax - ;, : - mov esi, selfName ; - - mov edi, buf ; - + ;, : + mov esi, selfName ; - + mov edi, buf ; - add edi, 10 mov ecx, 1 @@ -1084,162 +1078,35 @@ copyKill: pop edi esi ecx ebx eax ret - - - -reg: dw 0 -shlRegForSizeElems: - push eax edx - xor eax, eax - xor edx, edx - mov ax, word[reg] - mov dl, byte[mysize] -@@: - cmp dl, 0 - je @f - shl ax, 1 - dec dl - jmp @b -@@: - mov word[reg], ax - pop edx eax - ret - - WindowsWidth = 450 - WindowsHeight = 195 + 35 - 5 -coord: ; + WindowsWidth = 550 + WindowsHeight = 235 +coord: ; .y dw 0 .x dw 0 - - - - -BaseY = 36 ; , , - -elem: - .winWidth: dw 450 - .winHeight: dw 225 - .butAppleWidth: dw 80 - .butAppleHeight: dw 20 - .textDelta: dw 3 ; - .butDialWidth: dw 30 ; 4 - .butDialHeight: dw 14 - .textHeight: dw 9 ; - ;.editHeight: dw - .editCommandWidth: dw 150 ;180-butDialWidth - .butModeWidth: dw 221 - ;.textCommandUpY: dw 74 - .butModeY: dw 160 - ;.editRadiusWidth: dw 40 -elemEnd: - - -; -defaultElems: - mov word[elem.winWidth], 450 - mov word[elem.winHeight], 225 - mov word[elem.butAppleWidth], 80 - mov word[elem.butAppleHeight], 20 - mov word[elem.textDelta], 3 - mov word[elem.butDialWidth], 30 - mov word[elem.butDialHeight], 14 - mov word[elem.textHeight], 9 - mov word[elem.editCommandWidth], 150 - mov word[elem.butModeWidth], 221 - mov word[elem.butModeY], 160 - ;mov word[elem.editRadiusWidth], 40 - ret - -; ( 1 ) -resizeElems: - push ebx esi - xor ebx, ebx - mov esi, elem -@@: - cmp esi, elemEnd - jae @f - - mov bx, word[esi] - mov word[reg], bx - call shlRegForSizeElems - mov bx, word[reg] - mov word[esi], bx - add esi, 2 - jmp @b -@@: - pop esi ebx - ret - - - - - - - - draw_window: - ; , - mov edx, 0x80000002 - mcall 8 + mcall 12, 1 ; Start window redraw - ; 4 - mov edx, 0x80000004 - mcall 8 - mov edx, 0x80000005 - mcall 8 - mov edx, 0x80000006 - mcall 8 - mov edx, 0x80000007 - mcall 8 - - mov eax, 12 ; function 12: tell os about windowdraw - mov ebx, 1 ; 1, start of draw - mcall - - cmp byte[sizeStyle], 'x' - je draw_window_x - jmp draw_window_old - -draw_window_x: - mov word[elem.winWidth], 450+150 - mov word[elem.winHeight], 225+220/2 - mov word[elem.butAppleWidth], 80+80/3 - mov word[elem.butAppleHeight], 20+20/3 - mov word[elem.textDelta], 3 - mov word[elem.butDialWidth], 30+10 - mov word[elem.butDialHeight], 14+7 - mov word[elem.textHeight], 9*2 - mov word[elem.editCommandWidth], 150+50 - mov word[elem.butModeWidth], 221 - mov word[elem.butModeY], 160+90 - -draw_window_old: - ; : + ; : mcall 14 ; mov dword[coord], eax ; shr word[coord.x], 1 ; shr word[coord.y], 1 - ; , - mov bx, word[elem.winWidth] ; - shr bx, 1 - sub word[coord.x], bx - - mov bx, word[elem.winHeight] - shr bx, 1 - sub word[coord.y], bx + ; , + sub word[coord.x], WindowsWidth/2 + sub word[coord.y], WindowsHeight/2 mov eax, 0 ; function 0 : define and draw window mov ebx, 0 ; [x start] *65536 + [x size] mov bx, word[coord.x] shl ebx, 16 - mov bx, word[elem.winWidth] + mov bx, WindowsWidth mov ecx, 0 mov cx, word[coord.y] ; [y start] *65536 + [y size] shl ecx, 16 - mov cx, word[elem.winHeight] + mov cx, WindowsHeight mov edx, 0x14ffffff ; color of work area RRGGBB ; 0x02000000 = window type 4 (fixed size, skinned window) @@ -1248,478 +1115,120 @@ draw_window_old: mov edi, title mcall - - ; - ;push eax - xor eax, eax ;mov eax, 0 - mov ax, word[elem.editCommandWidth] - mov dword[editLU.width], eax - mov dword[editLD.width], eax - mov dword[editRU.width], eax - mov dword[editRD.width], eax - - ;mov ax, word[elem.editRadiusWidth] - mov ax, word[elem.winWidth] - sub ax, word[elem.butModeWidth] - sub ax, Otstup - sub ax, word[elem.butAppleHeight] ;Otstup - shr ax, 1 - sub ax, Otstup - mov dword[editRadius.width], eax - - ;mov ax, word[elem.butDialHeight] - xor ecx, ecx - call setNewSizeForText - mov dword[editLU.text_color], ecx ;0x90000000 ;eax - mov dword[editLD.text_color], ecx - mov dword[editRU.text_color], ecx - mov dword[editRD.text_color], ecx - mov dword[editRadius.text_color], ecx - - ;mov ecx, dword[editRadius.height] - ;mov word[elem.butDialHeight], cx - - ;mov eax, 0 - mov ax, word[elem.winWidth] - sub ax, Otstup - sub ax, word[elem.butDialWidth] - sub ax, word[elem.editCommandWidth] - mov dword[editRU.left], eax - mov dword[editRD.left], eax - - mov ax, Otstup - add ax, word[elem.butDialWidth] - mov dword[editLU.left], eax - mov dword[editLD.left], eax - - mov ax, word[elem.textHeight] - add ax, word[elem.textDelta] - shl ax, 2 - add ax, BaseY+2 - mov dword[editLU.top], eax - mov dword[editRU.top], eax - - add ax, 4 - ;mov ax, word[elem.textHeight] - ;add ax, word[elem.textDelta] - ;shl ax, 2 - sub ax, word[elem.textHeight] - ;add ax, BaseY - add ax, word[elem.textHeight] - ;add ax, 6 - add ax, word[elem.butDialHeight] - add ax, word[elem.textHeight] - add ax, word[elem.textHeight] - mov dword[editLD.top], eax - mov dword[editRD.top], eax - - ;pop eax - ;mcall 48,3,sc,40 - ;edit_boxes_set_sys_color editRadius, sc ;editLU, editLD, editRU, editRD, editRadius, sc - invoke edit_box_draw, editLU ; edit box' invoke edit_box_draw, editLD invoke edit_box_draw, editRU invoke edit_box_draw, editRD - ; - mov bx, word[elem.winWidth] ; X - sub bx, word[elem.butAppleWidth] - sub bx, Otstup - shl ebx, 16 - add bx, word[elem.butAppleWidth] ; + ; + buttonAppleY = WindowsHeight-40 + mcall 8, , , 2, 0x00AABBCC + mcall 4, , 0x10FFFFFF, buttonText, buttonTextSize - mov cx, word[elem.winHeight] ; Y - sub cx, word[elem.butAppleHeight] - sub cx, 15 - shl ecx, 16 - add cx, word[elem.butAppleHeight] ; - - mov edx, 0x00000002 ; - mov esi, 0x00AABBCC ; - mcall 8 - ; - mov bx, word[elem.winWidth] ; X - sub bx, word[elem.butAppleWidth] - sub bx, Otstup - add bx, 25 - sub bx, buttonTextXoffset ;!!!use size - shl ebx, 16 - add bx, word[elem.winHeight] ; Y - sub bx, word[elem.butAppleHeight] - sub bx, 15 - add bx, 6 ;!!!use size - - mov ecx, 0xFFFFFF ; - call setNewSizeForText - mov edx, buttonText - mov esi, buttonTextSize ; - mcall 4 - - ; 4 + ; 4 ; 4,5,6 7 - buttonH = 14 buttonW = 30 - - + buttonH = 21 ; - mov ebx, Otstup ; X - shl ebx, 16 - add bx, word[elem.butDialWidth] ; - - ;mov ecx, 85 ; Y 36+3*9+2*3+ 5 +9+2 - ;BaseY+4*(word[elem.textHeight]+word[elem.textDelta])+2 - mov cx, word[elem.textHeight] - add cx, word[elem.textDelta] - shl cx, 2 - add cx, BaseY+2 - shl ecx, 16 - add cx, word[elem.butDialHeight] ; - - mov edx, 0x00000004 ; - mov esi, 0x00AABBCC ; - mcall 8 - + mcall 8, , <85,buttonH>, 4, 0x00AABBCC ; - mov ebx, Otstup ; X - shl ebx, 16 - add bx, word[elem.butDialWidth] ; - ;mov ecx, 120 ; Y - mov cx, word[elem.textHeight] - add cx, word[elem.textDelta] - shl cx, 2 - sub cx, word[elem.textHeight] - add cx, BaseY - add cx, word[elem.textHeight] - add cx, 6 - add cx, word[elem.butDialHeight] - add cx, word[elem.textHeight] - add cx, word[elem.textHeight] - - shl ecx, 16 - add cx, word[elem.butDialHeight] ; - - mov edx, 0x00000005 ; - mov esi, 0x00AABBCC ; - mcall 8 - + mcall 8, , <120,buttonH>, 5 ; - ;mov ebx, (WindowsWidth-Otstup-buttonW)*65536 + buttonW ; X, - mov bx, word[elem.winWidth] ; X - sub bx, Otstup - sub bx, word[elem.butDialWidth] - - shl ebx, 16 - add bx, word[elem.butDialWidth] ; - - ;mov ecx, 85 ; Y 36+3*9+2*3+ 5 +9+2 - ;BaseY+4*(word[elem.textHeight]+word[elem.textDelta])+2 - mov cx, word[elem.textHeight] - add cx, word[elem.textDelta] - shl cx, 2 - add cx, BaseY+2 - shl ecx, 16 - add cx, word[elem.butDialHeight] ; - - mov edx, 0x00000006 ; - mov esi, 0x00AABBCC ; - mcall 8 - - - - + mcall 8, , <85,buttonH>, 6 ; - mov bx, word[elem.winWidth] ; X - sub bx, Otstup - sub bx, word[elem.butDialWidth] - shl ebx, 16 - add bx, word[elem.butDialWidth] ; + mcall 8, , <120,buttonH>, 7 - mov cx, word[elem.textHeight] ; Y - add cx, word[elem.textDelta] - shl cx, 2 - sub cx, word[elem.textHeight] - add cx, BaseY - add cx, word[elem.textHeight] - add cx, 6 - add cx, word[elem.butDialHeight] - add cx, word[elem.textHeight] - add cx, word[elem.textHeight] - shl ecx, 16 - add cx, word[elem.butDialHeight] ; - - mov edx, 0x00000007 ; - mov esi, 0x00AABBCC ; - mcall 8 - - ; 4 + ; 4 mov ecx, 0xFFFFFF ; - call setNewSizeForText mov edx, commonButtonText ; mov esi, commonButtonTextSize ; ; (x, y) deltaCommonTextX = 7 - deltaCommonTextY = 2 - ;mov ebx, (Otstup+deltaCommonTextX) * 65536 + (85 + deltaCommonTextY) - mov ebx, Otstup+deltaCommonTextX - shl ebx, 16 - mov bx, word[elem.textHeight] - add bx, word[elem.textDelta] - shl bx, 2 - add bx, BaseY+2 - add bx, deltaCommonTextY - - mcall 4 - -; - ;mov ebx, (Otstup+deltaCommonTextX) * 65536 + (120 + deltaCommonTextY) - mov ebx, Otstup+deltaCommonTextX - shl ebx, 16 - mov bx, word[elem.textHeight] ; Y - add bx, word[elem.textDelta] - shl bx, 2 - sub bx, word[elem.textHeight] - add bx, BaseY - add bx, word[elem.textHeight] - add bx, 6 - add bx, word[elem.butDialHeight] - add bx, word[elem.textHeight] - add bx, word[elem.textHeight] - add bx, deltaCommonTextY - - mcall 4 - - - ;mov ebx, (WindowsWidth-Otstup-buttonW+deltaCommonTextX) * 65536 + (85 + deltaCommonTextY) - mov bx, word[elem.winWidth] ; X - sub bx, Otstup - sub bx, word[elem.butDialWidth] - add bx, deltaCommonTextX - shl ebx, 16 - mov bx, word[elem.textHeight] - add bx, word[elem.textDelta] - shl bx, 2 - add bx, BaseY+2 - add bx, deltaCommonTextY - - mcall 4 - - ;mov ebx, (WindowsWidth-Otstup-buttonW+deltaCommonTextX) * 65536 + (120 + deltaCommonTextY) - mov bx, word[elem.winWidth] ; X - sub bx, Otstup - sub bx, word[elem.butDialWidth] - add bx, deltaCommonTextX - shl ebx, 16 - mov bx, word[elem.textHeight] ; Y - add bx, word[elem.textDelta] - shl bx, 2 - sub bx, word[elem.textHeight] - add bx, BaseY - add bx, word[elem.textHeight] - add bx, 6 - add bx, word[elem.butDialHeight] - add bx, word[elem.textHeight] - add bx, word[elem.textHeight] - add bx, deltaCommonTextY - - mcall 4 + deltaCommonTextY = 6 + mcall 4, + mcall 4, + mcall 4, + mcall 4, ;delete mode button, if it exist mov edx, 0x80000008 mcall 8 ;draw button Mode - buttonModeX = 30 - buttonModeY = 160 - buttonModeWidth = 221 - buttonModeHeight = 14 + buttonModeX = 30 ;433 + buttonModeY = 160 ;50 + buttonModeWidth = 300 + buttonModeHeight = 20 buttonModeTextYoffset = 3 buttonModeTextXoffset = 5 - ;mov ebx, buttonModeX*65536 + buttonModeWidth ;X + Width - mov ebx, Otstup - shl ebx, 16 - add bx, word[elem.butModeWidth] - - mov cx, word[elem.butModeY] ;buttonModeY;*65536 + buttonModeHeight ;Y + Height - shl ecx, 16 - mov cx, word[elem.butDialHeight] - - mov edx, 0x00000008 ;button id - mov esi, 0x00FFFFFF ;color button - mcall 8 - - ;mov ebx, (buttonModeX+2+buttonModeWidth-20)*65536 + (20-2) ;X + Width - mov ebx, Otstup+2 - add bx, word[elem.butModeWidth] - sub bx, 20 - shl ebx, 16 - add bx, 20-2 - - ; mov ecx, (buttonModeY+1)*65536 + buttonModeHeight-2 ;Y + Height - mov cx, word[elem.butModeY] - inc ecx - shl ecx, 16 - mov cx, word[elem.butDialHeight] - sub cx, 2 - - mov edx, 0xAABBCC - mcall 13 + mcall 8, , , 8, 0x00FFFFFF + mcall 13, , , 0xAABBCC ;draw text for button Mode - mov ebx, (Otstup+buttonModeTextXoffset) * 65536 ;(x, y) - mov bx, word[elem.butModeY] - add bx, buttonModeTextYoffset - mov ecx, 0x000000 - call setNewSizeForText - and ecx, 0x7FFFFFFF + mov ebx, (buttonModeX+buttonModeTextXoffset) * 65536 + (buttonModeY+buttonModeTextYoffset) ;(x, y) + mov ecx, 0x10000000 call setTextModeMenu -mov esi, valueModeMenuSize -cmp byte[sizeStyle], 'x' -jne @f - mov esi, 25 ;valueModeMenuSize -3 ; -@@: + mov esi, valueModeMenuSize mcall 4 - - mov ebx, (Otstup-12) - add bx, word[elem.butModeWidth] - shl ebx, 16 - mov bx, word[elem.butModeY] - add bx, buttonModeTextYoffset - - mov ecx, 0x80FFFFFF ;80 - call setNewSizeForText - and ecx, 0x7FFFFFFF - ;or ecx, 0x80000000 - + mov ebx, (buttonModeX+buttonModeWidth-12) * 65536 + (buttonModeY+buttonModeTextYoffset+3) + mov ecx, 0x80FFFFFF mov edx, symbolDownArrow - mov esi, 1 mcall 4 - ; - buttonHotKeyX = 270 + ; + buttonHotKeyX = 350-10 buttonHotKeyWidth = 90 - mov edx, 0x80000009 ; + mov edx, 0x80000009 ; mcall 8 cmp byte[mode], 49 ; , mode > 1 jbe @f ; push eax ebx ecx edx esi - ; mov ebx, buttonHotKeyX*65536 + buttonHotKeyWidth ;X + Width - mov ebx, Otstup - add bx, word[elem.butModeWidth] - add bx, word[elem.butAppleHeight] - shl ebx, 16 - mov bx, word[elem.winWidth] ;buttonHotKeyWidth - sub bx, word[elem.butModeWidth] - sub bx, Otstup - sub bx, word[elem.butAppleHeight] ;Otstup - shr bx, 1 - sub bx, Otstup - ; mov ecx, buttonModeY*65536 + buttonModeHeight ;Y + Height - mov cx, word[elem.butModeY] - shl ecx, 16 - mov cx, word[elem.butDialHeight] - + mov ebx, buttonHotKeyX*65536 + buttonHotKeyWidth ;X + Width + mov ecx, buttonModeY*65536 + buttonModeHeight ;Y + Height mov edx, 0x00000009 ;button id mov esi, 0x00FFFFFF ;color button mcall 8 pop esi edx ecx ebx eax - ; - ;mov ebx, (buttonHotKeyX+buttonModeTextXoffset) * 65536 + (buttonModeY+buttonModeTextYoffset) ;(x, y) - mov ebx, Otstup - add bx, word[elem.butModeWidth] - add bx, word[elem.butAppleHeight] - add bx, buttonModeTextYoffset - shl ebx, 16 - mov bx, word[elem.butModeY] - add bx, buttonModeTextYoffset - -; xor ecx, ecx -; mov ch, byte[mysize] -; shl ecx, 16 -; add ecx, 0x80224466 - mov ecx, 0x224466 - call setNewSizeForText - ;and ecx, 0x7FFFFFFF - or ecx, 0x80000000 - + ; + mov ebx, (buttonHotKeyX+buttonModeTextXoffset) * 65536 + (buttonModeY+buttonModeTextYoffset) ;(x, y) + mov ecx, 0x90224466 call setTextForHotKey mov esi, valueModeMenuSize mcall 4 ; push eax ebx ecx edx edi esi - ;mov ebx, buttonHotKeyX * 65536 + (buttonModeY-11) - mov ebx, Otstup ;buttonHotKeyX ;Otstup - add bx, word[elem.butModeWidth] - add bx, word[elem.butAppleHeight] - shl ebx, 16 - add bx, word[elem.butModeY] - sub bx, 2 - sub bx, word[elem.textHeight] - -; xor ecx, ecx -; mov ch, byte[mysize] -; shl ecx, 16 -; add ecx, 0x80224466 - mov ecx, 0x224466 - call setNewSizeForText - ;and ecx, 0x7FFFFFFF - or ecx, 0x80000000 - + mov ebx, buttonHotKeyX * 65536 + (buttonModeY-11) + mov ecx, 0x80224466 mov edx, hkCaption mov esi, 3 mcall 4 pop esi edi edx ecx ebx eax @@: - ; , 3 + ; , 3 cmp byte[mode], 51 jne @f ; push eax ebx ecx edx edi esi - xor ebx, ebx - mov bx, word[elem.winWidth] - sub bx, Otstup - sub ebx, dword[editRadius.width] - shl ebx, 16 - add bx, word[elem.butModeY] - sub bx, 2 - sub bx, word[elem.textHeight] - -; mov ecx, 0 -; mov ch, byte[mysize] -; shl ecx, 16 -; add ecx, 0x80224466 - - mov ecx, 0x224466 - call setNewSizeForText - ;and ecx, 0x7FFFFFFF - or ecx, 0x80000000 - - ;mov ecx, 0x80224466 + mov ebx, (buttonHotKeyX + buttonHotKeyWidth + 20) * 65536 + (buttonModeY-11) + mov ecx, 0x80224466 mov edx, radiusCaption mov esi, 3 mcall 4 pop esi edi edx ecx ebx eax - - - xor eax, eax - mov ax, word[elem.winWidth] - sub ax, Otstup - sub eax, dword[editRadius.width] - mov dword[editRadius.left], eax - mov ax, word[elem.butModeY] - mov dword[editRadius.top], eax - invoke edit_box_draw, editRadius @@: call draw_super_text LineLength = 62 - mov ebx, 40 * 65536 + BaseY ; draw info text with function 4 (x, y) + mov ebx, Otstup * 65536 + 32 ; draw info text with function 4 (x, y) - mov ecx, 0x224466 - call setNewSizeForText - and ecx, 0x7FFFFFFF + ;xor ecx, ecx + ;mov cl, 1 ;byte[mysize] + ;shl ecx, 24 + ;add ecx, 0x224466 + ;or ecx, 0x00224466 ;80224466 + mov ecx, 0x10224466 mov edx, text mov esi, LineLength @@ -1727,37 +1236,15 @@ jne @f .newline: ; text from the DATA AREA mcall - add bx, word[elem.textHeight] ;9*n+3 ;12 - add bx, word[elem.textDelta] - + add ebx, 15 add edx, LineLength cmp byte[edx], 0 jne .newline - mov eax, 12 ; function 12:tell os about windowdraw - mov ebx, 2 ; 2, end of draw - mcall + mcall 12, 2 ; End window redraw ret - -setNewSizeForText: - push ebx - mov ebx, ecx - cmp byte[sizeStyle], 'x' - je .x - mov ecx, 0 - mov ch, byte[mysize] - shl ecx, 16 - jmp @f -.x: - mov ecx,[sc.work_text] - or ecx,0x90000000 -@@: - add ecx, ebx - pop ebx - ret - hkSymbol: db 0, 0 setTextForHotKey: @@ -1824,7 +1311,7 @@ setTextForHotKey: mov dword[hkSize], 1 jmp setTextForHotKey.end @@: - mov word[hkSymbol], 0 ; - , + mov word[hkSymbol], 0 ; - , mov edx, hkHint mov dword[hkSize], 5 ;shift or space - .end: @@ -1915,19 +1402,18 @@ import box_lib,\ option_box_draw, 'option_box_draw',\ option_box_mouse, 'option_box_mouse' -commonButtonText db '...', 0 ; OpenDial +commonButtonText db '...', 0 ; OpenDial commonButtonTextSize = 3 -if lang eq ru ; +if lang eq ru ; text db "䨣 Hot Angles ⢥砥 ன ⨢ 㣫. " - db "ன ࠬ ᥡ ⪫ . ", 0 -; db " ", 0 + db "ன ࠬ ᥡ ⪫ . " + db " ", 0 hed: title db "䨣 ⨫ Hot Angles", 0 buttonText db "ਬ", 0 buttonTextSize = 9 -buttonTextXoffset = 12 ch_text db '/⨢஢ "Hot Angles"', 0 @@ -1953,20 +1439,20 @@ head_f_i: err_message_import1 db '訡 ⥪ ',39,'kmenu',39,0 hkCaption: db ':',0 +;hkHint: db ' ',0 radiusCaption: db ':',0 else ; text db "This is a Hot Angles Configurator. " - db "Set the parameters bellow for yourself or disable this option.", 0 -; db " ", 0 + db "Set the parameters bellow for yourself or disable this option." + db " ", 0 hed: title db "Hot Angles Configurator", 0 -buttonText db "Apply", 0 +buttonText db " Apply ", 0 buttonTextSize = 5 -buttonTextXoffset = 0 -ch_text db 'Activate "Hot Angles"',0 ; +ch_text db 'Activate "Hot Angles"',0 ; superText: .lu db 'Left up angle command: ', 0 @@ -1990,6 +1476,7 @@ head_f_i: err_message_import1 db 'Error importing library ',39,'kmenu',39,0 hkCaption: db 'Key:',0 +;hkHint: db 'press any key',0 radiusCaption: db 'Radius:',0 end if @@ -2004,78 +1491,28 @@ hkSize: rd 1 ; draw_super_text: push eax ebx ecx edx edi esi -; mov ecx, 0 -; mov ch, byte[mysize] -; shl ecx, 16 -; add ecx, 0x224466 - mov ecx, 0x224466 - call setNewSizeForText - ;and ecx, 0x7FFFFFFF - or ecx, 0x80000000 + mov ecx, 0 + mov ch, byte[mysize] + shl ecx, 16 + add ecx, 0x224466 - ;mov ebx, Otstup * 65536 + 74 ; draw info text with function 4 (x, y) - mov bx, Otstup - shl ebx, 16 - mov bx, word[elem.textHeight] - add bx, word[elem.textDelta] - shl bx, 2 - sub bx, word[elem.textHeight] - add bx, BaseY - - ;mov ecx, 0x224466 - mov eax, superText.lu - mov edx, eax - mov esi, superTextSize - mcall 4 - - ;mov ebx, Otstup * 65536 + 109 ;9+2+14+(9+1) - add bx, word[elem.textHeight] - add bx, 4;3 - add bx, word[elem.butDialHeight] - add bx, word[elem.textHeight] - - mov edx, superText.ld - mov esi, superTextSize - mcall 4 - - ;mov ebx, 240 * 65536 + 74 - mov bx, word[elem.winWidth] - sub bx, word[elem.butDialWidth] - sub bx, word[elem.editCommandWidth] - sub bx, Otstup - shl ebx, 16 - mov bx, word[elem.textHeight] - add bx, word[elem.textDelta] - shl bx, 2 - sub bx, word[elem.textHeight] - add bx, BaseY - - mov edx, superText.ru - mov esi, superTextSize - mcall 4 - - ;mov ebx, 240 * 65536 + 109 - add bx, word[elem.textHeight] - add bx, 4;3;2 - add bx, word[elem.butDialHeight] - add bx, word[elem.textHeight] - - mov edx, superText.rd - mov esi, superTextSize - mcall 4 - - ;mov ebx, Otstup * 65536 + (buttonModeY-11) - mov ebx, Otstup - shl ebx, 16 - add bx, word[elem.butModeY] - sub bx, 2 - sub bx, word[elem.textHeight] + mcall 4, ,,superText.lu,superTextSize + mcall 4, ,,superText.ld,superTextSize + mcall 4, <290,74> ,,superText.ru,superTextSize + mcall 4, <290,109> ,,superText.rd,superTextSize + mov ebx, Otstup * 65536 + (buttonModeY-11) or ecx, 0x80000000 mov edx, ModeMenu mov esi, 3 mcall 4 +; mov ebx, buttonHotKeyX * 65536 + (buttonModeY-11) +; or ecx, 0x80000000 +; mov edx, hkCaption +; mov esi, 3 +; mcall 4 + pop esi edi edx ecx ebx eax ret @@ -2175,7 +1612,7 @@ IntToStr: ;in esi - je .end jmp .next .end: - mov byte[esi], 0 ; + mov byte[esi], 0 ; pop esi edx ecx eax call reverseString ; ret @@ -2184,11 +1621,11 @@ IntToStr: ;in esi - reverseString: push eax esi edi - mov al, byte[esi] ; + mov al, byte[esi] ; cmp al, 0 je reverseString.end - mov edi, esi ; edi + mov edi, esi ; edi .go_last_symbol: mov al, byte[edi+1] cmp al, 0 @@ -2202,7 +1639,7 @@ reverseString: cmp esi, edi jae @f - ; + ; mov al, byte[edi] mov bl, byte[esi] mov byte[edi], bl @@ -2239,7 +1676,7 @@ but_open_dlg: popad ret -; +; align 4 OpenDialog_data: .type dd 0 ;0 - , 1 - , 2 - @@ -2248,7 +1685,7 @@ OpenDialog_data: .com_area dd 0 ;+12 .opendir_path dd plugin_path ;+16 .dir_default_path dd default_dir ;+20 -.start_path dd file_name ;+24 +.start_path dd file_name ;+24 .draw_window dd draw_window ;+28 .status dd 0 ;+32 .openfile_path dd openfile_path ;+36 @@ -2261,7 +1698,7 @@ OpenDialog_data: .y_size dw 320 ;+52 ; Window y size .y_start dw 10 ;+54 ; Window Y position -default_dir db '/rd/1',0 ; +default_dir db '/rd/1',0 ; communication_area_name: db 'FFFFFFFF_open_dialog',0 open_dialog_name: db 'opendial',0 communication_area_default_path: db '/rd/1/File managers/',0 @@ -2305,11 +1742,11 @@ edMaxSize = 510 ; edMax = 0 ;max, size, pos align 4 -editLU edit_box 180-buttonW,Otstup+buttonW,85, 0xffffff, 0x6a9480, 0, 0xAABBCC, 0, edMaxSize, dataBuffer.1, mouse_dd, 0, edMax, edMax ;ed_focus -editLD edit_box 180-buttonW,Otstup+buttonW,120, 0xffffff, 0x6a9480, 0, 0xAABBCC, 0, edMaxSize, dataBuffer.2, mouse_dd, 0, edMax, edMax -editRU edit_box 180-buttonW,240,85, 0xffffff, 0x6a9480, 0, 0xAABBCC, 0, edMaxSize, dataBuffer.3, mouse_dd, 0, edMax, edMax -editRD edit_box 180-buttonW,240,120, 0xffffff, 0x6a9480, 0, 0xAABBCC, 0, edMaxSize, dataBuffer.4, mouse_dd, 0, edMax, edMax -editRadius edit_box 40,(buttonHotKeyX + buttonHotKeyWidth + 20),buttonModeY, 0xffffff, 0x6a9480, 0, 0xAABBCC, 0, 4, radiusBuffer.data, mouse_dd, ed_figure_only, edMax, edMax +editLU edit_box 230-buttonW,Otstup+buttonW,85, 0xffffff, 0x6a9480, 0, 0xAABBCC, 0x10000000, edMaxSize, dataBuffer.1, mouse_dd, 0, edMax, edMax ;ed_focus +editLD edit_box 230-buttonW,Otstup+buttonW,120, 0xffffff, 0x6a9480, 0, 0xAABBCC, 0x10000000, edMaxSize, dataBuffer.2, mouse_dd, 0, edMax, edMax +editRU edit_box 230-buttonW,290,85, 0xffffff, 0x6a9480, 0, 0xAABBCC, 0x10000000, edMaxSize, dataBuffer.3, mouse_dd, 0, edMax, edMax +editRD edit_box 230-buttonW,290,120, 0xffffff, 0x6a9480, 0, 0xAABBCC, 0x10000000, edMaxSize, dataBuffer.4, mouse_dd, 0, edMax, edMax +editRadius edit_box 40,(buttonHotKeyX + buttonHotKeyWidth + 20),buttonModeY, 0xffffff, 0x6a9480, 0, 0xAABBCC, 0x10000000, 4, radiusBuffer.data, mouse_dd, ed_figure_only, edMax, edMax align 4 import_libkmenu: @@ -2340,7 +1777,7 @@ mouse_dd rd 1 sizeStyle: rb 1 ; mysize: rb 1 ;rd 1 -radiusBuffer: ; +radiusBuffer: ; .data: rb 6 .size: rd 1 radiusBufferEnd: @@ -2359,7 +1796,7 @@ pi rb 1024 keyscan: rb 1 keystr: .data: rb 4 ; - .size: rd 1 ; + .size: rd 1 ; dataBuffer: .1: rb 512 @@ -2371,13 +1808,13 @@ dataBuffer: .size3: rd 1 .size4: rd 1 ;255+255+2 = 512 -; , 0 +; , 0 dataBufferEnd: I_END: - rb 256 ;1024 ;4096 -align 4 ;16 + rb 4096 +align 16 STACKTOP: MEM: diff --git a/programs/other/ha/ReadMe.txt b/programs/other/ha/ReadMe.txt index 417a9ca428..ee4cf1ea96 100644 --- a/programs/other/ha/ReadMe.txt +++ b/programs/other/ha/ReadMe.txt @@ -20,11 +20,6 @@ HACONFIG - 6) ( 2 3): '0'..'9','a'..'z','A'..'Z',Space,Shift,Alt,Ctrl,'~' (: Shift,Alt,Ctrl 0.3.7); 7) ( , @HOTANGLES); 8) ( mode 3); -9) : - a - auto, ; - x - sc.work_text ( 2018 ); - 1 7 - (- 2); - s - ( ). , , ( '-'). : 0.3.6 5 .