forked from KolibriOS/kolibrios
Added utility "Hot Angles" version 0.1 (source code @HOTANGLES and HACONFIG).
git-svn-id: svn://kolibrios.org@7377 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ae1c56c94d
commit
f4e4bccefb
BIN
programs/other/HotAngles/HA/@HOTANGLES
Normal file
BIN
programs/other/HotAngles/HA/@HOTANGLES
Normal file
Binary file not shown.
378
programs/other/HotAngles/HA/@HOTANGLES.ASM
Normal file
378
programs/other/HotAngles/HA/@HOTANGLES.ASM
Normal file
@ -0,0 +1,378 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Hot Angles ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Compile with FASM
|
||||
; Version 0.1: Sep 18, 2018
|
||||
|
||||
; Copyright (c) 2018, Efremenkov Sergey aka TheOnlyMirage
|
||||
; All rights reserved.
|
||||
; Redistribution and use in source and binary forms, with or without modification,
|
||||
; are permitted provided that the following conditions are met:
|
||||
; * Redistributions of source code must retain the above copyright notice, this
|
||||
; list of conditions and the following disclaimer.
|
||||
; * Redistributions in binary form must reproduce the above copyright notice,
|
||||
; this list of conditions and the following disclaimer in the documentation and/or
|
||||
; other materials provided with the distribution.
|
||||
; * Neither the name of the <organization> nor the names of its contributors may
|
||||
; be used to endorse or promote products derived from this software without
|
||||
; specific prior written permission.
|
||||
|
||||
; THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
; INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
; PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
; --------------------------------------------------------------------------------------
|
||||
|
||||
format binary as "" ;"kex"
|
||||
use32
|
||||
org 0x0 ; áàçîâûé àäðåñ ðàçìåùåíèÿ êîäà, âñåãäà 0x0
|
||||
|
||||
UNLOCKd = 0
|
||||
LOCKd = 1
|
||||
|
||||
; çàãîëîâîê
|
||||
db 'MENUET01' ;ìàãè÷åñêèé èäåíòèôèêàòîð
|
||||
dd 0x01 ;âåðñèÿ
|
||||
dd START_DEBUG ;àäðåñ òî÷êè ñòàðòà ïðîãðàììû
|
||||
dd I_END ;àäðåñ êîíöà, ïî ôàêòó ðàçìåð ôàéëà ïðîãðàììû
|
||||
dd 0x100000 ;òðåáóåìîå êîë-âî ïàìÿòè äëÿ çàãðóçêè ïðîãðàììû
|
||||
dd 0x7fff0 ;íà÷àëüíîå çíà÷åíèå ðåãèñòðà esp - àäðåñ êîíöà îáëàñòè ñòýêà òàê êàê ñòýê ðàñòåò â ñòîðîíó ìåíüøèõ àäðåñîâ
|
||||
dd 0, 0 ;àäðåñ ñòðîêè ïàðàìåòðîâ è àäðåñ ñòðîêè ïóòè èñïîëíÿåìîãî ôàéëà
|
||||
|
||||
|
||||
include '../../../macros.inc'
|
||||
|
||||
START_DEBUG:
|
||||
call copyKill ;ïðîñòåéøàÿ çàùèòà îò ïîâòîðíîãî çàïóñêà
|
||||
mcall 68, 11 ;èíèöèàëèçàöèÿ êó÷è
|
||||
call loadConfig ;çàãðóæàåì êîíôèãóðàöèþ ïðèëîæåíèÿ
|
||||
mov ebx, 00000100000000000000000000100000b ;ïîäïèñûâàåìñÿ íà èíòåðåñíûå íàì ñîáûòèÿ
|
||||
mcall 40
|
||||
|
||||
START:
|
||||
mov eax, 10 ; function 10 : wait until event
|
||||
mcall ; event type is returned in eax
|
||||
|
||||
cmp eax, 6 ;îáðàáîòêà ïåðåìåùåíèé è íàæàòèÿ ìûøè
|
||||
je mouse
|
||||
|
||||
jmp START
|
||||
|
||||
mouse:
|
||||
;îñíîâíîé öèêë ïðîãðàììû
|
||||
call get_mouse_pos ;ïîëó÷àåì òåêóùèå êîîðäèíàòû ìûøè
|
||||
|
||||
cmp eax, 0 ;ëåâûé âåðõíèé óãîë
|
||||
jne @f
|
||||
; -- çäåñü âûçûâàåì ñîîòâ. âûçîâ äëÿ ëåâîãî âåðõíåãî óãëà (X=0, Y=0)
|
||||
push ecx
|
||||
mov ecx, 0
|
||||
call run_command
|
||||
pop ecx
|
||||
|
||||
jmp START ;finish
|
||||
@@:
|
||||
call get_screen_size ;èíà÷å îáíîâëÿåì ðàçìåðû ýêðàíà
|
||||
|
||||
cmp ax, word[screen.height] ;Ymouse = Yscreen ?
|
||||
je Ytrue
|
||||
;åñëè Y íå ðàâíû, òî íàñ èíòåðåñóåò Y=0 è X=ScreenWidth (ïðàâûé âåðõíèé óãîë)
|
||||
|
||||
cmp ax, 0
|
||||
jne unlockend
|
||||
shr eax, 16
|
||||
cmp ax, word[screen.width]
|
||||
jne unlockend
|
||||
; -- çäåñü âûçûâàåì äëÿ ïðàâîãî âåðõåíåãî óãëà
|
||||
push ecx
|
||||
mov ecx, 2
|
||||
call run_command
|
||||
pop ecx
|
||||
|
||||
jmp START
|
||||
Ytrue:
|
||||
;åñëè Y ðàâíû, òî íàñ èíòåðåñóåò X=0 (ëåâûé íèæíèé óãîë) èëè X=ScreenWidth (ïðàâûé íèæíèé)
|
||||
shr eax, 16
|
||||
cmp ax, 0
|
||||
jne @f
|
||||
; -- X=0, Y = Height (ëåâûé íèæíèé óãîë)
|
||||
push ecx
|
||||
mov ecx, 1
|
||||
call run_command
|
||||
pop ecx
|
||||
jmp START
|
||||
@@:
|
||||
cmp ax, word[screen.width]
|
||||
jne unlockend
|
||||
; -- (ïðàâûé íèæíèé óãîë)
|
||||
push ecx
|
||||
mov ecx, 3
|
||||
call run_command
|
||||
pop ecx
|
||||
|
||||
jmp START
|
||||
|
||||
unlockend:
|
||||
mov byte[state], UNLOCKd
|
||||
jmp START
|
||||
|
||||
|
||||
;ñòðóêòóðêà äàííûõ äëÿ õðàíåíèÿ ïàðàìåòðîâ ýêðàíà
|
||||
screen:
|
||||
.width dw 0
|
||||
.height dw 0
|
||||
;ïîëó÷èòü ðàçìåð ýêðàíà
|
||||
get_screen_size:
|
||||
push eax
|
||||
mcall 14
|
||||
;òåïåðü â eax = [xsize]*65536 + [ysize]
|
||||
;mov dword[screen], eax
|
||||
mov word[screen.height], ax
|
||||
shr eax, 16
|
||||
mov word[screen.width], ax
|
||||
pop eax
|
||||
ret
|
||||
|
||||
|
||||
;ïîëó÷èòü ïîçèöèþ ìûøè
|
||||
get_mouse_pos:
|
||||
;push eax
|
||||
push ebx
|
||||
mcall 37, 0
|
||||
pop ebx
|
||||
;pop eax
|
||||
ret
|
||||
|
||||
|
||||
;çàïóñê ïðèëîæåíèÿ: ecx - àêòèâíûé óãîë: lu=0, ld=1, ru=2, rd=3
|
||||
run_command:
|
||||
cmp byte[state], UNLOCKd
|
||||
jne run_command.end
|
||||
|
||||
push eax
|
||||
push ebx
|
||||
push ecx
|
||||
|
||||
|
||||
cmp ecx, 0
|
||||
jne @f
|
||||
mov eax, dword[newData.lu] ;testData.lu
|
||||
mov dword[struct70.path_adr], eax
|
||||
jmp .end_set_path
|
||||
@@:
|
||||
cmp ecx, 1
|
||||
jne @f
|
||||
mov eax, dword[newData.ld]
|
||||
mov dword[struct70.path_adr], eax
|
||||
jmp .end_set_path
|
||||
@@:
|
||||
cmp ecx, 2
|
||||
jne @f
|
||||
mov eax, dword[newData.ru]
|
||||
mov dword[struct70.path_adr], eax
|
||||
jmp .end_set_path
|
||||
@@:
|
||||
cmp ecx, 3
|
||||
jne .end_set_path
|
||||
mov eax, dword[newData.rd]
|
||||
mov dword[struct70.path_adr], eax
|
||||
jmp .end_set_path
|
||||
.end_set_path:
|
||||
|
||||
;ïàðàìåòðû
|
||||
;mov dword[struct.adr],
|
||||
|
||||
;ýòîò êîä çàìåíèòü - åñëè àäðåñ 0, òî íè÷åãî íå äåëàòü
|
||||
cmp dword[struct70.path_adr], 0
|
||||
jne .next
|
||||
mov eax, testData.ld ;
|
||||
mov dword[struct70.path_adr], eax
|
||||
.next:
|
||||
;êîíåö êîäà äëÿ çàìåíû
|
||||
|
||||
mcall 70, struct70
|
||||
mov byte[state], LOCKd
|
||||
|
||||
pop ecx
|
||||
pop ebx
|
||||
pop eax
|
||||
.end:
|
||||
ret
|
||||
|
||||
struct70: ;Ôîðìàò èíôîðìàöèîííîé ñòðóêòóðû
|
||||
.func dd 7 ; íîìåð ïîäôóíêöèè
|
||||
.mask dd 0
|
||||
.param_adr dd 0 ; óêàçàòåëü íà ASCIIZ-ñòðîêó ñ ïàðàìåòðàìè
|
||||
.other dd 0, 0
|
||||
.path db 0 ; "/rd/1/TINYPAD",0 ; ïóòü
|
||||
.path_adr dd 0 ;testData.lu ;0
|
||||
|
||||
|
||||
state: db 0 ; 0=unlock, 1=lock
|
||||
|
||||
testData:
|
||||
.lu db '/rd/1/SHELL', 0
|
||||
.ld db '/rd/1/RUN', 0
|
||||
.ru db "/rd/1/TINYPAD", 0
|
||||
.rd db '/rd/1/File Managers/EOLITE', 0
|
||||
|
||||
newData: ;òàáëè÷êà àäðåñîâ êîìàíäíûõ ñòðîê
|
||||
.lu dd 0
|
||||
.ld dd 0
|
||||
.ru dd 0
|
||||
.rd dd 0
|
||||
newDataEnd:
|
||||
|
||||
;èìÿ êîíôèãóðàöèîííîãî ôàéëà
|
||||
fileName: db 'SETTINGS/HOTANGLES.CFG', 0 ;'ha.cfg', 0
|
||||
|
||||
loadConfig:
|
||||
push eax
|
||||
push ebx
|
||||
push ecx
|
||||
push edx
|
||||
mcall 68, 27, fileName ;çàãðóæàåì êîíôèãóðàöèîííûé ôàéë â ÎÇÓ
|
||||
cmp eax, 0
|
||||
je loadConfig.exit ;åñëè ôàéëà êîíôèãóðàöèè íåò, òî çàâåðøàåì ðàáîòó ïðèëîæåíèÿ
|
||||
;èíà÷å äàííûå çàãðóæåíû â ÎÇÓ, ðàçìåð â edx
|
||||
cmp edx, 0 ;åñëè ôàéë ïóñò, â í¸ì íåò äàííûõ, òî çàâåðøàåì ðàáîòó
|
||||
je loadConfig.exit
|
||||
|
||||
add edx, eax ;èíà÷å êëàä¸ì â edx - àäðåñ êîíöà ôàéëà
|
||||
|
||||
cmp byte[eax], 121 ;'y' ;åñëè ïàðàìåòð àêòèâíîñòè ïðèëîæåíèÿ èìååò ñòàòóñ: íå àêòèâíî
|
||||
jne loadConfig.exit ;òî çàâåðøàåì ðàáîòó ïðèëîæåíèÿ
|
||||
|
||||
push edi
|
||||
push esi
|
||||
; ñîõðàíÿåì â edi óêàçàòåëü íà íà÷àëî òàáëèöû àäðåñîâ íàøèõ êîìàíä
|
||||
mov edi, newData
|
||||
; ñîõðàíÿåì àäðåñà ñòðîê è äîáàâëÿåì 0 â êîíöå
|
||||
mov esi, eax
|
||||
.block:
|
||||
inc esi
|
||||
cmp byte[esi], 10 ;åñëè î÷åðåäíîé êîä ñèìâîëà 10 èëè 13, òî ïðîïóñêàåì ñèìâîëû
|
||||
je loadConfig.propusk ;äî ïåðâîãî îòëè÷íîãî îò íèõ
|
||||
cmp byte[esi], 13
|
||||
je loadConfig.propusk
|
||||
|
||||
; ñèìâîë îòëè÷åí îò ïåðåíîñà ñòðîêè è âîçâðàòà êàðåòêè - çàïîìèíàåì åãî
|
||||
mov dword[edi], esi
|
||||
add edi, 4
|
||||
|
||||
;èä¸ì äî êîíöà ýòîé ñòðîêè: ïîêà íå âñòðåòèì î÷åðåäíîé 10, 13, 0 èëè file end
|
||||
.while:
|
||||
inc esi
|
||||
cmp esi, edx ;òóò áóäåò ïðîáëåìà - òê ôàéë çàêîí÷èëñÿ, à íóëÿ íå áûëî !!! èñïðàâèòü
|
||||
jae loadConfig.fileend
|
||||
cmp byte[esi], 10
|
||||
je loadConfig.ura
|
||||
cmp byte[esi], 0
|
||||
je loadConfig.ura
|
||||
cmp byte[esi], 13
|
||||
jne loadConfig.while
|
||||
.ura:
|
||||
mov byte[esi], 0
|
||||
|
||||
cmp edi, newDataEnd ;newData.end ;åñëè âñÿ òàáëèöà àäðåñîâ çàïîëíåíà, òî âûõîäèì èç öèêëà
|
||||
jb loadConfig.block
|
||||
.fileend:
|
||||
|
||||
pop esi
|
||||
pop edi
|
||||
|
||||
jmp loadConfig.end
|
||||
|
||||
.propusk:
|
||||
mov byte[esi], 0
|
||||
jmp loadConfig.block
|
||||
.exit:
|
||||
pop edx
|
||||
pop ecx
|
||||
pop ebx
|
||||
pop eax
|
||||
mcall -1 ;çàêðûòü ýòó ïðîãðàììó
|
||||
.end:
|
||||
pop edx
|
||||
pop ecx
|
||||
pop ebx
|
||||
pop eax
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
;Âûíåñòè êîä íèæå â îòäåëüíûé îáùèé ìîäóëü
|
||||
selfName db '@HOTANGLES',0
|
||||
selfNameSize = 10 ;äî 11 byte
|
||||
;
|
||||
compareBytes:
|
||||
push edi esi ecx ebx
|
||||
mov eax, 0 ;xor eax, eax
|
||||
mov ecx, selfNameSize ;max ðàçìåð ñòðîê 11
|
||||
@@:
|
||||
mov bl, byte[edi]
|
||||
cmp bl, byte[esi]
|
||||
jne compareBytes.no
|
||||
inc edi
|
||||
inc esi
|
||||
cmp ecx, 0
|
||||
je @f
|
||||
dec ecx
|
||||
jmp @b
|
||||
.no:
|
||||
mov eax, 1
|
||||
@@:
|
||||
pop ebx ecx esi edi
|
||||
ret
|
||||
;
|
||||
slotMax dd 0
|
||||
selfPID dd 0
|
||||
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 ;âòîðàÿ ñòðîêà - èìÿ òåêóùåãî ñëîòà
|
||||
add edi, 10
|
||||
|
||||
mov ecx, 1
|
||||
@@:
|
||||
mcall 9, buf, ecx
|
||||
mov dword[slotMax], eax
|
||||
|
||||
;åñëè ýòî ìû ñàìè, òî ïðîïóñêàåì ïðîâåðêó
|
||||
mov eax, dword[buf+30]
|
||||
cmp eax, dword[selfPID]
|
||||
je copyKill.propusk
|
||||
|
||||
call compareBytes ;ñðàâíèâàåì 11 áàéò ñòðîê, ðåçóëüòàò â eax
|
||||
|
||||
cmp eax, 0
|
||||
je copyKill.selfKill
|
||||
|
||||
.propusk:
|
||||
inc ecx
|
||||
cmp ecx, dword[slotMax]
|
||||
ja @f
|
||||
jmp @b
|
||||
|
||||
.selfKill:
|
||||
pop edi esi ecx ebx eax
|
||||
mcall -1
|
||||
ret
|
||||
@@:
|
||||
pop edi esi ecx ebx eax
|
||||
ret
|
||||
|
||||
|
||||
|
||||
I_END:
|
22
programs/other/HotAngles/HA/AUTORUN.DAT
Normal file
22
programs/other/HotAngles/HA/AUTORUN.DAT
Normal file
@ -0,0 +1,22 @@
|
||||
# Syntaxis is: <Program_Name> <Parameter(s)> <Delay_Time>
|
||||
# Use "parameter value" for parameters with spaces. Use "" if no parameter is required.
|
||||
# Delay time means how much the system should wait, before running the next line. It is measured in 1/100 seconds.
|
||||
# If delay is negative, wait for termination of the spawned process. Otherwise, simply wait
|
||||
#
|
||||
#/SYS/CROPFLAT "XS800 YS480" 1 # set limits of screen
|
||||
#/SYS/LOADDRV COMMOUSE 1 # serial mouse driver
|
||||
#/SYS/DEVELOP/BOARD "" 0 # Load DEBUG board
|
||||
/SYS/SETUP BOOT 0 # Load device settings
|
||||
/SYS/LOADDRV RDC 0 # videodriver for RDC M2010/M2012
|
||||
/SYS/@TASKBAR "" 0 # Start taskbar
|
||||
/SYS/@ICON "" 0 # Multithread icon
|
||||
/SYS/ESKIN "" 0 # Set style
|
||||
/SYS/@DOCKY "" 0 # Start docky
|
||||
/SYS/NETWORK/NETCFG A 0 #
|
||||
/SYS/NETWORK/@ZEROCONF "" 0 # Network configuration
|
||||
/SYS/@VOLUME "" 0 # Start volume daemon
|
||||
/SYS/@SS ASSM 0 # Screensaver
|
||||
/SYS/TMPDISK A0 -1 # Add virtual RAM disk /tmp0/1
|
||||
/SYS/SEARCHAP "" -1 # Search and mount additional system directory
|
||||
/SYS/@HOTANGLES "" 0 # Start Hot Angles
|
||||
### Hello, ASM World! ###
|
5
programs/other/HotAngles/HA/SETTINGS/HOTANGLES.CFG
Normal file
5
programs/other/HotAngles/HA/SETTINGS/HOTANGLES.CFG
Normal file
@ -0,0 +1,5 @@
|
||||
y
|
||||
/rd/1/SHELL
|
||||
/rd/1/RUN
|
||||
/rd/1/TINYPAD
|
||||
/rd/1/File Managers/EOLITE
|
9
programs/other/HotAngles/HA/Tupfile.lua
Normal file
9
programs/other/HotAngles/HA/Tupfile.lua
Normal file
@ -0,0 +1,9 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
--[[tup.foreach_rule(
|
||||
{"@HOTANGLES.asm"},
|
||||
"fasm %f %o " .. tup.getconfig("KPACK_CMD"),
|
||||
"%B"
|
||||
)
|
||||
]]--
|
||||
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "ru" or tup.getconfig("LANG")) .. " > lang.inc", {"lang.inc"})
|
||||
tup.rule({"@HOTANGLES.asm", extra_inputs = {"lang.inc"}}, "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "@HOTANGLES")
|
5
programs/other/HotAngles/HA/build.bat
Normal file
5
programs/other/HotAngles/HA/build.bat
Normal file
@ -0,0 +1,5 @@
|
||||
@echo lang fix ru >lang.inc
|
||||
@fasm.exe -m 16384 @HOTANGLES.asm @HOTANGLES
|
||||
@erase lang.inc
|
||||
@kpack @HOTANGLES
|
||||
@pause
|
BIN
programs/other/HotAngles/HAconfig/HACONFIG
Normal file
BIN
programs/other/HotAngles/HAconfig/HACONFIG
Normal file
Binary file not shown.
671
programs/other/HotAngles/HAconfig/HACONFIG.asm
Normal file
671
programs/other/HotAngles/HAconfig/HACONFIG.asm
Normal file
@ -0,0 +1,671 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Hot Angles Config ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Compile with FASM
|
||||
; Version 0.1: Sep 18, 2018
|
||||
|
||||
; Copyright (c) 2018, Efremenkov Sergey aka TheOnlyMirage
|
||||
; All rights reserved.
|
||||
; Redistribution and use in source and binary forms, with or without modification,
|
||||
; are permitted provided that the following conditions are met:
|
||||
; * Redistributions of source code must retain the above copyright notice, this
|
||||
; list of conditions and the following disclaimer.
|
||||
; * Redistributions in binary form must reproduce the above copyright notice,
|
||||
; this list of conditions and the following disclaimer in the documentation and/or
|
||||
; other materials provided with the distribution.
|
||||
; * Neither the name of the <organization> nor the names of its contributors may
|
||||
; be used to endorse or promote products derived from this software without
|
||||
; specific prior written permission.
|
||||
|
||||
; THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
; INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
; PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
; --------------------------------------------------------------------------------------
|
||||
|
||||
;P.S. Êîä ñûðîé, òðåáóåòñÿ îïòèìèçàöèÿ è äîðàáîòêà (ñì. òåìó ôîðóìà)
|
||||
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
|
||||
dd I_END
|
||||
dd MEM
|
||||
dd STACKTOP
|
||||
dd 0, 0
|
||||
|
||||
; Íà÷àëî îáëàñòè êîäà
|
||||
include '../../../macros.inc'
|
||||
include 'editbox.inc'
|
||||
use_edit_box
|
||||
include 'check.inc' ;âêëþ÷èòü ôàéë check.inc
|
||||
version_ch1 ;íåîáõîäèìûé ìàêðîñ äëÿ âêëþ÷åíèÿ new âåðñèè check_box1
|
||||
use_check_box ;èñïîëüçóÿ ìàêðîñû, âíåñòè ïðîöåäóðû äëÿ ðèñîâàíèÿ ÷åê áîêñà
|
||||
|
||||
Otstup = 30
|
||||
|
||||
START:
|
||||
call copyKill ;ïðîñòåéøàÿ çàùèòà îò çàïóñêà âòîðîé êîïèè ïðèëîæåíèÿ
|
||||
mcall 68, 11 ;èíèöèàëèçàöèÿ êó÷è
|
||||
|
||||
mov eax,48 ;ïîëó÷èòü ñèñòåìíûå öâåòà
|
||||
mov ebx,3
|
||||
mov ecx, sc
|
||||
mov edx, sizeof.system_colors
|
||||
mcall
|
||||
|
||||
mov eax,40 ;óñòàíîâèòü ìàñêó äëÿ îæèäàåìûõ ñîáûòèé
|
||||
mov ebx,0x27 ;ñèñòåìà áóäåò ðåàãèðîâàòü òîëüêî íà ñîîáùåíèå î ïåðåðèñîâêå, íàæàòà êíîïêà, îïðåäåë¸ííàÿ ðàíåå, ñîáûòèå îò ìûøè (÷òî-òî ñëó÷èëîñü - íàæàòèå íà êíîïêó ìûøè èëè ïåðåìåùåíèå; ñáðàñûâàåòñÿ ïðè ïðî÷òåíèè)
|
||||
mcall
|
||||
|
||||
call loadConfig ;çàãðóæàåì êîíôèãóðàöèþ èç ôàéëà, åñëè íåò - òî âûñòàâëÿåì ïàðàìåòðû ïî óìîë÷àíèþ
|
||||
call draw_window ;îòðèñîâàòü îêíî ïðèëîæåíèÿ
|
||||
|
||||
; Îáðàáîòêà öèêëà ñîáûòèé
|
||||
event_wait:
|
||||
mov eax, 10 ; function 10 : wait until event
|
||||
mcall ; event type is returned in eax
|
||||
|
||||
cmp eax, 1 ; Event redraw request ?
|
||||
je red ; Expl.: there has been activity on screen and
|
||||
; parts of the applications has to be redrawn.
|
||||
|
||||
cmp eax, 2 ; Event key in buffer ?
|
||||
je key ; Expl.: User has pressed a key while the
|
||||
; app is at the top of the window stack.
|
||||
|
||||
cmp eax, 3 ; Event button in buffer ?
|
||||
je button ; Expl.: User has pressed one of the
|
||||
; applications buttons.
|
||||
|
||||
mouse_edit_boxes editboxes,editboxes_end
|
||||
mouse_check_boxes check_boxes,check_boxes_end ;ïðîâåðêà ÷åê áîêñà
|
||||
jmp event_wait
|
||||
|
||||
|
||||
red: ;îáðàáîòêà ñîáûòèÿ ïåðåðèñîâêè îêíà
|
||||
call draw_window
|
||||
jmp event_wait
|
||||
|
||||
key: ; Keypress event handler
|
||||
mov eax, 2 ; The key is returned in ah. The key must be
|
||||
mcall ; read and cleared from the system queue.
|
||||
key_edit_boxes editboxes,editboxes_end
|
||||
jmp event_wait ; Just read the key, ignore it and jump to event_wait.
|
||||
|
||||
button: ; Buttonpress event handler
|
||||
mov eax,17 ; The button number defined in window_draw
|
||||
mcall ; is returned to ah.
|
||||
|
||||
cmp ah,1 ; button id=1 ?
|
||||
jne noclose
|
||||
mov eax,-1 ; Function -1 : close this program
|
||||
mcall
|
||||
noclose:
|
||||
cmp ah, 2 ;êíîïêà "Ïðèìåíèòü"
|
||||
jne butend
|
||||
call applyButton ;âûçîâ íàøåãî îáðàáîò÷èêà íàæàòèÿ êíîïêè
|
||||
butend:
|
||||
jmp event_wait ;this is for ignored events, useful at development
|
||||
|
||||
|
||||
|
||||
;èìÿ êîíôèãóðàöèîííîãî ôàéëà
|
||||
fileName: db 'SETTINGS/HOTANGLES.CFG', 0
|
||||
|
||||
;ñòðóêòóðà äëÿ ñîçäàíèÿ/ïåðåçàïèñè ôàéëà
|
||||
createFile:
|
||||
.func dd 2 ;íîìåð ïîäôóíêöèè
|
||||
.re dd 0, 0 ;çàðåçåðâèðîâàíî
|
||||
.size dd 0 ;ñêîëüêî áàéò ïèñàòü
|
||||
.data_adr dd 0 ;óêàçàòåëü íà äàííûå
|
||||
.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
|
||||
defaultDataSize = 48+19
|
||||
|
||||
|
||||
copyParam: ;êîïèðóåò ïàðàìåòð(êîìàíäó çàïóñêà) â áóôåð (ñì. äàëüøå)
|
||||
push esi ebx ecx
|
||||
mov ecx, dword[ebx] ;÷èòàåì ðàçìåð ñòðîêè
|
||||
.copy: ;êîïèðóåì ñèìâîëû
|
||||
cmp ecx, 0
|
||||
je copyParam.copyEnd
|
||||
mov bl, byte[esi]
|
||||
mov byte[eax], bl
|
||||
dec ecx
|
||||
inc eax
|
||||
inc esi
|
||||
jmp copyParam.copy
|
||||
.copyEnd:
|
||||
pop ecx ebx esi
|
||||
ret
|
||||
|
||||
|
||||
addPerenos: ;äîáàâëÿåò ïåðåíîñ ñòðîêè â áóôåð
|
||||
mov byte[eax], 13
|
||||
inc eax
|
||||
mov byte[eax], 10
|
||||
inc eax
|
||||
ret
|
||||
|
||||
;îáðàáîò÷èê êíîïêè "Ïðèìåíèòü"
|
||||
applyButton:
|
||||
push eax ebx ecx
|
||||
;mov dword[createFile.data_adr], defaultDataForConfig
|
||||
;mov dword[createFile.size], defaultDataSize
|
||||
|
||||
;âû÷èñëèì ðàçìåð ôàéëà êîíôèãóðàöèè â áàéòàõ
|
||||
mov ecx, 5*2+1 ;1 áàéò íà ñîñòîÿíèå àêòèâíîñòè è 5 ïàð ïåðåíîñîâ ñòðîê (ñèìâîëû 13, 10)
|
||||
add ecx, dword[editLU.size] ;dataBuffer.size1] ;ïëþñ ðàçìåð êàæäîé ñòðîêè â áàéòàõ
|
||||
add ecx, dword[editLD.size] ;dataBuffer.size2]
|
||||
add ecx, dword[editRU.size] ;dataBuffer.size3]
|
||||
add ecx, dword[editRD.size] ;dataBuffer.size4]
|
||||
;òåïåðü ðàçìåð ôàéëà êîíôèãóðàöèè â ecx
|
||||
mov dword[createFile.size], ecx ;ïîëîæèì ðàçìåð áàéò â ñòðóêòóðó ñîçäàíèÿ/ïåðåçàïèñè ôàéëà
|
||||
mcall 68, 12, ecx ;âûäåëÿåì áëîê ïàìÿòè ïîä áóôåð ñîäåðæèìîãî
|
||||
mov dword[createFile.data_adr], eax ;ñîõðàíÿåì àäðåñ áóôåðà â ñòðóêòóðó
|
||||
|
||||
;çàïîëíèì áóôåð ñîäåðæèìîãî:
|
||||
mov byte[eax], 110; 'n' ;ïî óìîë÷àíèþ ôëàã ñíÿò
|
||||
cmp word[ch1.flags], ch_flag_en ;âûñòàâëåí checkBox èëè íåò?
|
||||
jne applyButton.no
|
||||
mov byte[eax], 121 ;èíà÷å êëàä¸ì 'y'
|
||||
.no:
|
||||
inc eax
|
||||
call addPerenos
|
||||
|
||||
push esi ebx
|
||||
call UpdateEditsSizes ;îáíîâèòü ðàçìåðû òåêñòà â edit'àõ
|
||||
|
||||
mov esi, dataBuffer.1 ;editLU.text
|
||||
mov ebx, dataBuffer.size1 ;editLU.size
|
||||
call copyParam
|
||||
call addPerenos ;äîáàâëÿåì ïåðåíîñ ñòðîêè
|
||||
|
||||
mov esi, dataBuffer.2 ;editLD.text
|
||||
mov ebx, dataBuffer.size2 ;editLD.size
|
||||
call copyParam
|
||||
call addPerenos ;äîáàâëÿåì ïåðåíîñ ñòðîêè
|
||||
|
||||
mov esi, dataBuffer.3
|
||||
mov ebx, dataBuffer.size3
|
||||
call copyParam
|
||||
call addPerenos ;äîáàâëÿåì ïåðåíîñ ñòðîêè
|
||||
|
||||
mov esi, dataBuffer.4
|
||||
mov ebx, dataBuffer.size4
|
||||
call copyParam
|
||||
call addPerenos ;äîáàâëÿåì ïåðåíîñ ñòðîêè
|
||||
|
||||
pop ebx esi
|
||||
|
||||
|
||||
mov ebx, createFile
|
||||
mcall 70
|
||||
cmp eax, 0
|
||||
je .end
|
||||
;èíà÷å çäåñü íóæíî âûâåñòè îêíî ñ îøèáêîé !!!
|
||||
.end:
|
||||
mcall 68, 13, dword[createFile.data_adr] ;îñâîáîæäàåì ïàìÿòü ïîä áóôåð
|
||||
call restartHotAnglesApp ;ïåðåçàïóñêàåì @HOTANGLES
|
||||
pop ecx ebx eax
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
compareBytes2:
|
||||
push edi esi ecx ebx
|
||||
xor eax, eax
|
||||
mov ecx, 10 ;max ðàçìåð ñòðîê 11
|
||||
@@:
|
||||
mov bl, byte[edi]
|
||||
cmp bl, byte[esi]
|
||||
jne compareBytes.no
|
||||
inc edi
|
||||
inc esi
|
||||
cmp ecx, 0
|
||||
je @f
|
||||
dec ecx
|
||||
jmp @b
|
||||
.no:
|
||||
mov eax, 1
|
||||
@@:
|
||||
pop ebx ecx esi edi
|
||||
ret
|
||||
|
||||
|
||||
restartHotAnglesApp: ;!!!
|
||||
;íàõîäèì âñå êîïèè ïðèëîæåíèÿ ïî èìåíè è çàâåðøàåì èõ
|
||||
push eax ebx ecx esi edi
|
||||
;óêàçàòåëè, êîòîðûå íèêîãäà íå ìåíÿþòñÿ:
|
||||
mov esi, startAppData.file_name ;ïåðâàÿ ñòðîêà - èñêîìîå èìÿ ïðèëîæåíèÿ
|
||||
mov edi, buf ;âòîðàÿ ñòðîêà - èìÿ òåêóùåãî ñëîòà
|
||||
add edi, 10
|
||||
|
||||
mov ecx, 1
|
||||
@@:
|
||||
mcall 9, buf, ecx ;ïîëó÷àåì äàííûå î÷åðåäíîãî ñëîòà
|
||||
mov dword[slotMax], eax
|
||||
|
||||
call compareBytes2 ;ñðàâíèâàåì èìÿ
|
||||
cmp eax, 0
|
||||
jne restartHotAnglesApp.next ;åñëè íå ñîâïàëî, òî ïåðåõîäèì íà ñëåäóþùèé ñëîò
|
||||
|
||||
;push eax ebx ecx
|
||||
mcall 18, 2, ecx ;èíà÷å çàâåðøàåì ñëîò
|
||||
;pop ecx ebx eax
|
||||
|
||||
.next:
|
||||
inc ecx
|
||||
cmp ecx, dword[slotMax]
|
||||
ja @f
|
||||
jmp @b
|
||||
@@:
|
||||
pop edi esi ecx ebx eax
|
||||
|
||||
;çàïóñêàåì ïðèëîæåíèå çàíîâî
|
||||
push eax ebx
|
||||
mcall 70, startAppData
|
||||
cmp eax, 0
|
||||
ja @f ;åñëè eax>0, òî óñïåøíî çàïóùåíî
|
||||
;!!! èíà÷å òóò ïå÷àòàåì îøèáêó
|
||||
@@:
|
||||
pop ebx eax
|
||||
ret
|
||||
|
||||
startAppData:
|
||||
.subfunction dd 7
|
||||
.flags dd 0
|
||||
.param dd 0
|
||||
.rezerv dd 0, 0
|
||||
.full_name db '/rd/1/'
|
||||
.file_name db '@HOTANGLES', 0
|
||||
;db 0
|
||||
;.name: dd HotAnglesAppName
|
||||
;HotAnglesAppName db '@HOTANGLES', 0
|
||||
|
||||
|
||||
UpdateEditsSizes:
|
||||
push eax
|
||||
mov eax, dword[editLU.size]
|
||||
mov dword[dataBuffer.size1], eax
|
||||
|
||||
mov eax, dword[editLD.size]
|
||||
mov dword[dataBuffer.size2], eax
|
||||
|
||||
mov eax, dword[editRU.size]
|
||||
mov dword[dataBuffer.size3], eax
|
||||
|
||||
mov eax, dword[editRD.size]
|
||||
mov dword[dataBuffer.size4], eax
|
||||
|
||||
pop eax
|
||||
ret
|
||||
|
||||
fileAdr dd 0
|
||||
|
||||
loadConfig:
|
||||
push eax ebx ecx edx
|
||||
mcall 68, 27, fileName ;çàãðóæàåì êîíôèãóðàöèîííûé ôàéë â ÎÇÓ
|
||||
mov dword[fileAdr], eax ;ñîõðàíÿåì àäðåñ áëîêà ïàìÿòè ôàéëà
|
||||
cmp eax, 0
|
||||
je loadConfig.default ;åñëè ôàéëà êîíôèãóðàöèè íåò, òî ñòàâèì íàñòðîéêè ïî óìîë÷àíèþ
|
||||
;èíà÷å äàííûå çàãðóæåíû â ÎÇÓ, ðàçìåð â edx
|
||||
cmp edx, 0 ;åñëè ôàéë ïóñò, â í¸ì íåò äàííûõ, òî ñòàâèì íàñòðîéêè ïî óìîë÷àíèþ
|
||||
je loadConfig.default
|
||||
.start:
|
||||
add edx, eax ;êëàä¸ì â edx - àäðåñ êîíöà êîíôèã.äàííûõ
|
||||
|
||||
.chStart:
|
||||
cmp byte[eax], 121 ;'y' ;âûñòàâëÿåì checkBox - ïàðàìåòð àêòèâíîñòè ïðèëîæåíèÿ
|
||||
jne loadConfig.no
|
||||
.yes:
|
||||
mov word[ch1.flags], ch_flag_en
|
||||
jmp loadConfig.chEnd
|
||||
.no:
|
||||
mov word[ch1.flags], 0
|
||||
.chEnd:
|
||||
;jmp loadConfig.end ;êîìàíäà äëÿ óäîáñòâà îòëàäêè è ïîèñêà îøèáîê
|
||||
|
||||
;êîïèðóåì ñîäåðæèìîå ñòðîê â áóôåð
|
||||
push edi esi ecx ebx eax
|
||||
;èíèöèàëèçèðóåì óêàçàòåëè íà àäðåñà áóôåðà ñòðîêè è å¸ ðàçìåðà
|
||||
mov edi, dataBuffer.1 ;dword[dataBuffer.1]
|
||||
mov esi, dataBuffer.size1 ;dword[dataBuffer.size1]
|
||||
;ecx - ñ÷¸ò÷èê áàéò â ñòðîêå
|
||||
; mov ecx, 0 ;xor ecx, ecx
|
||||
.block:
|
||||
xor ecx, ecx ;îáíóëÿåì ñ÷¸ò÷èê
|
||||
inc eax
|
||||
cmp byte[eax], 10 ;åñëè î÷åðåäíîé êîä ñèìâîëà 10 èëè 13, òî ïðîïóñêàåì ñèìâîëû
|
||||
je loadConfig.block ;propusk ;äî ïåðâîãî îòëè÷íîãî îò íèõ
|
||||
cmp byte[eax], 13
|
||||
je loadConfig.block ;propusk
|
||||
|
||||
; ñèìâîë îòëè÷åí îò ïåðåíîñà ñòðîêè è âîçâðàòà êàðåòêè - íà÷èíàåì êîïèðîâàòü îòñþäà â áóôåð
|
||||
mov bl, byte[eax]
|
||||
mov byte[edi], bl
|
||||
inc edi
|
||||
inc eax
|
||||
inc ecx ;óâåëè÷èâàåì ñ÷¸ò÷èê ñèìâîëîâ â ñòðîêå
|
||||
|
||||
;èä¸ì äî êîíöà ýòîé ñòðîêè: ïîêà íå âñòðåòèì î÷åðåäíîé 10, 13, 0 èëè file end
|
||||
.while: ;è êîïèðóåì âñ¸ â áóôåð
|
||||
cmp eax, edx ;ïðîâåðÿåì çàêîí÷èëñÿ ëè ôàéë, à êîíöà ñòðîêè íå áûëî !!!
|
||||
ja loadConfig.ura
|
||||
cmp byte[eax], 10
|
||||
je loadConfig.ura
|
||||
cmp byte[eax], 0
|
||||
je loadConfig.ura
|
||||
cmp byte[eax], 13
|
||||
je loadConfig.ura
|
||||
|
||||
mov bl, byte[eax]
|
||||
mov byte[edi], bl
|
||||
inc edi
|
||||
inc eax
|
||||
inc ecx
|
||||
cmp ecx, 511
|
||||
jae loadConfig.ura
|
||||
jmp loadConfig.while
|
||||
.ura:
|
||||
mov byte[edi], 0 ;êëàä¸ì çàâåðøàþùèé 0 â ñòðîêó
|
||||
mov dword[esi], ecx ;ñîõðàíÿåì ðàçìåð ñòðîêè
|
||||
add esi, 4 ;ïåðåõîäèì íà ðàçìåð ñëåäóþùåãî áóôåðà
|
||||
sub edi, ecx ;ïåðåõîäèì íà ñëåäóþùèé áóôåð
|
||||
add edi, 512
|
||||
; mov ecx, 0 ;xor ecx, ecx ;îáíóëÿåì ðàçìåð ñòðîêè
|
||||
|
||||
cmp edi, dataBuffer.size1 ;åñëè ýòî áûë ïîñëåäíèé áóôåð (è ìû âûøëè çà àäðåñà ðàçìåðîâ áóôåðîâ), òî âûõîäèì
|
||||
jb loadConfig.block
|
||||
|
||||
pop eax ebx ecx esi edi
|
||||
|
||||
jmp loadConfig.end
|
||||
.default:
|
||||
mov eax, defaultDataForConfig
|
||||
mov edx, defaultDataSize
|
||||
jmp loadConfig.start
|
||||
.end:
|
||||
mov ecx, dword[fileAdr] ;åñëè ôàéë áûë çàãðóæåí, òî
|
||||
cmp ecx, 0
|
||||
je @f
|
||||
mcall 68, 13, ecx ;âûãðóæàåì ôàéë èç ïàìÿòè
|
||||
@@:
|
||||
call updateParams ;ïðèìåíÿåì íàñòðîéêè êàæäîãî áóôåðà
|
||||
pop edx ecx ebx eax
|
||||
ret
|
||||
|
||||
|
||||
updateParams: ;max, size, pos
|
||||
push eax
|
||||
mov eax, dword[dataBuffer.size1]
|
||||
mov dword[editLU.size], eax
|
||||
mov dword[editLU.pos], eax
|
||||
|
||||
mov eax, dword[dataBuffer.size2]
|
||||
mov dword[editLD.size], eax
|
||||
mov dword[editLD.pos], eax
|
||||
|
||||
mov eax, dword[dataBuffer.size3]
|
||||
mov dword[editRU.size], eax
|
||||
mov dword[editRU.pos], eax
|
||||
|
||||
mov eax, dword[dataBuffer.size4]
|
||||
mov dword[editRD.size], eax
|
||||
mov dword[editRD.pos], eax
|
||||
pop eax
|
||||
ret
|
||||
|
||||
|
||||
|
||||
selfName db 'HACONFIG', 0 ;'@HOTANGLES',0
|
||||
selfNameSize = 8;9 ;äî 11 byte
|
||||
;
|
||||
compareBytes:
|
||||
push edi esi ecx ebx
|
||||
mov eax, 0 ;xor eax, eax
|
||||
mov ecx, selfNameSize ;11 ;max ðàçìåð ñòðîê 11
|
||||
@@:
|
||||
mov bl, byte[edi]
|
||||
cmp bl, byte[esi]
|
||||
jne compareBytes.no
|
||||
inc edi
|
||||
inc esi
|
||||
cmp ecx, 0
|
||||
je @f
|
||||
dec ecx
|
||||
jmp @b
|
||||
.no:
|
||||
mov eax, 1
|
||||
@@:
|
||||
pop ebx ecx esi edi
|
||||
ret
|
||||
;
|
||||
slotMax dd 0
|
||||
selfPID dd 0
|
||||
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 ;âòîðàÿ ñòðîêà - èìÿ òåêóùåãî ñëîòà
|
||||
add edi, 10
|
||||
|
||||
mov ecx, 1
|
||||
@@:
|
||||
mcall 9, buf, ecx
|
||||
mov dword[slotMax], eax
|
||||
|
||||
;åñëè ýòî ìû ñàìè, òî ïðîïóñêàåì ïðîâåðêó
|
||||
mov eax, dword[buf+30]
|
||||
cmp eax, dword[selfPID]
|
||||
je copyKill.propusk
|
||||
|
||||
call compareBytes ;ñðàâíèâàåì 11 áàéò ñòðîê, ðåçóëüòàò â eax
|
||||
|
||||
cmp eax, 0
|
||||
je copyKill.selfKill
|
||||
|
||||
.propusk:
|
||||
inc ecx
|
||||
cmp ecx, dword[slotMax]
|
||||
ja @f
|
||||
jmp @b
|
||||
|
||||
.selfKill:
|
||||
pop edi esi ecx ebx eax
|
||||
mcall -1
|
||||
ret
|
||||
@@:
|
||||
pop edi esi ecx ebx eax
|
||||
ret
|
||||
|
||||
WindowsWidth = 450
|
||||
WindowsHeight = 195
|
||||
coord: ;êîîðäèíàòû îêíà ïðèëîæåíèÿ
|
||||
.y dw 0
|
||||
.x dw 0
|
||||
|
||||
draw_window:
|
||||
;óäàëÿåì êíîïêó, åñëè åñòü
|
||||
mov edx, 0x80000002
|
||||
mcall 8
|
||||
|
||||
mov eax, 12 ; function 12: tell os about windowdraw
|
||||
mov ebx, 1 ; 1, start of draw
|
||||
mcall
|
||||
|
||||
;îòîáðàçèì îêíî ïî öåíòðó ýêðàíà äëÿ ýòîãî:
|
||||
mcall 14 ;ïîëó÷èì ðàçìåðû ýêðàíà
|
||||
mov dword[coord], eax ;ïîëîæèì ðàçìåðû ýêðàíà â êîîðäèíàòû
|
||||
shr word[coord.x], 1 ;âåðíåå ïîëîæèì èõ ïîëîâèíó
|
||||
shr word[coord.y], 1
|
||||
|
||||
;âû÷èñëÿåì êîîðäèíàòû îêíà, ÷òîáû îêíî áûëî ïî ñåðåäèíå ýêðàíà
|
||||
sub word[coord.x], WindowsWidth/2
|
||||
sub word[coord.y], WindowsHeight/2
|
||||
|
||||
mov eax, 0 ; function 0 : define and draw window
|
||||
mov ebx, 0 ;* 65536 + WindowsWidth ; [x start] *65536 + [x size]
|
||||
mov bx, word[coord.x]
|
||||
shl ebx, 16
|
||||
mov bx, WindowsWidth
|
||||
|
||||
mov ecx, 0
|
||||
mov cx, word[coord.y] ;* 65536 + WindowsHeight ; [y start] *65536 + [y size]
|
||||
shl ecx, 16
|
||||
mov cx, WindowsHeight
|
||||
|
||||
mov edx, 0x14ffffff ; color of work area RRGGBB
|
||||
; 0x02000000 = window type 4 (fixed size, skinned window)
|
||||
mov esi, 0x808899ff ; color of grab bar RRGGBB
|
||||
; 0x80000000 = color glide
|
||||
mov edi, title
|
||||
mcall
|
||||
|
||||
draw_check_boxes check_boxes,check_boxes_end ;ðèñîâàíèå ÷åêáîêñîâ
|
||||
draw_edit_boxes editboxes,editboxes_end ;ðèñîâàíèå edit box'îâ
|
||||
|
||||
;ðèñóåì êíîïêó
|
||||
mov ebx, (WindowsWidth-80-Otstup)*65536 + 80 ;êîîðäèíàòà X, øèðèíà êíîïêè
|
||||
mov ecx, 160*65536 + 20 ;êîîðäèíàòà Y, âûñîòà êíîïêè
|
||||
mov edx, 0x00000002 ;2 ;íîìåð êíîïêè
|
||||
mov esi, 0x00AABBCC ;öâåò êíîïêè
|
||||
mcall 8
|
||||
;ðèñóåì òåêñò êíîïêè
|
||||
mov ebx, (WindowsWidth-80-Otstup+25) * 65536 + 166 ;êîîðäèíàòû òåêñòà (x, y)
|
||||
mov ecx, 0xFFFFFF ;áåëûé öâåò òåêñòà
|
||||
mov edx, buttonText
|
||||
mov esi, 5 ;ðàçìåð òåêñòà â ñèìâîëàõ
|
||||
mcall 4
|
||||
|
||||
call draw_super_text
|
||||
|
||||
LineLength = 62 ;42
|
||||
mov ebx, 40 * 65536 + 36 ; draw info text with function 4 (x, y)
|
||||
mov ecx, 0x224466
|
||||
mov edx, text
|
||||
mov esi, LineLength
|
||||
mov eax, 4
|
||||
|
||||
.newline: ; text from the DATA AREA
|
||||
mcall
|
||||
add ebx, 12
|
||||
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
|
||||
|
||||
ret
|
||||
|
||||
|
||||
text db "This is a Hot Angles Configurator. "
|
||||
db "Set the parameters bellow for yourself or disable this option."
|
||||
db " ", 0
|
||||
hed:
|
||||
title db "Hot Angles Configurator", 0
|
||||
buttonText db "Apply", 0
|
||||
|
||||
align 4
|
||||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
;DATA äàííûå äëÿ check_box1 - èñïîëüçóåò ñèñòåìíûå öâåòà
|
||||
;Ôîðìàò äàííûõ ÷åê áîêñà:
|
||||
; êîîðäèíàòà õ, êîîðäèíàòà ó, óêàçàòåëü íà íà÷àëî ñòðîêè, äëèíà ñòðîêè
|
||||
;ñîñòîÿíèå ðàáîòû óòèëèòû: àêòèâíà/íåò
|
||||
check_boxes:
|
||||
ch1 check_box1 30,160,ch_text.1,ch_text.e1-ch_text.1,ch_flag_en
|
||||
check_boxes_end:
|
||||
|
||||
ch_text: ;ñîïðîâîæäàþùèé òåêñò äëÿ ÷åê áîêñîâ
|
||||
.1 db 'Activate "Hot Angles"'
|
||||
.e1:
|
||||
|
||||
superText:
|
||||
.lu db 'Left up angle command:', 0
|
||||
.ld db 'Left down angle command:', 0
|
||||
.ru db "Right up angle command:", 0
|
||||
.rd db 'Right down angle command:', 0
|
||||
|
||||
draw_super_text:
|
||||
push eax ebx ecx edx edi esi
|
||||
mov ebx, Otstup * 65536 + 74 ; draw info text with function 4 (x, y)
|
||||
mov ecx, 0x224466
|
||||
mov eax, superText.lu
|
||||
mov edx, eax
|
||||
mov esi, 22
|
||||
mcall 4
|
||||
|
||||
mov ebx, Otstup * 65536 + 109
|
||||
mov edx, superText.ld
|
||||
mov esi, 24
|
||||
mcall 4
|
||||
|
||||
mov ebx, 240 * 65536 + 74
|
||||
mov edx, superText.ru
|
||||
mov esi, 23
|
||||
mcall 4
|
||||
|
||||
mov ebx, 240 * 65536 + 109
|
||||
mov edx, superText.rd
|
||||
mov esi, 25
|
||||
mcall 4
|
||||
|
||||
pop esi edi edx ecx ebx eax
|
||||
ret
|
||||
|
||||
|
||||
edMaxSize = 510
|
||||
edMax = 0 ;max, size, pos
|
||||
|
||||
editboxes:
|
||||
editLU edit_box 180,Otstup,85,0xffffff,0x6a9480,0,0xAABBCC,0,edMaxSize,dataBuffer.1,ed_focus,edMax,edMax
|
||||
editLD edit_box 180,Otstup,120,0xffffff,0x6a9480,0,0xAABBCC,0,edMaxSize,dataBuffer.2,ed_focus,edMax,edMax
|
||||
editRU edit_box 180,240,85,0xffffff,0x6a9480,0,0xAABBCC,0,edMaxSize,dataBuffer.3,ed_focus,edMax,edMax
|
||||
editRD edit_box 180,240,120,0xffffff,0x6a9480,0,0xAABBCC,0,edMaxSize,dataBuffer.4,ed_focus,edMax,edMax
|
||||
editboxes_end:
|
||||
|
||||
data_of_code dd 0
|
||||
mouse_flag dd 0x0
|
||||
|
||||
dataBuffer:
|
||||
.1: rb 512
|
||||
.2: rb 512
|
||||
.3: rb 512
|
||||
.4: rb 512
|
||||
.size1: rd 1
|
||||
.size2: rd 1
|
||||
.size3: rd 1
|
||||
.size4: rd 1
|
||||
;255+255+2
|
||||
;äâà çàïàñíûõ áàéòà íåîáõîäèìû äëÿ òîãî ÷òî áû íå ïåïåðåïèñàòü ñëåäóþùèåé áàéòû, â êîíöå áóôåðà 0
|
||||
dataBufferEnd:
|
||||
|
||||
sc system_colors
|
||||
|
||||
I_END:
|
||||
rb 4096
|
||||
align 16
|
||||
STACKTOP:
|
||||
|
||||
MEM:
|
5
programs/other/HotAngles/HAconfig/SETTINGS/HOTANGLES.CFG
Normal file
5
programs/other/HotAngles/HAconfig/SETTINGS/HOTANGLES.CFG
Normal file
@ -0,0 +1,5 @@
|
||||
y
|
||||
/rd/1/HACONFIG
|
||||
/rd/1/HACONFIG
|
||||
/rd/1/HACONFIG
|
||||
/rd/1/HACONFIG
|
9
programs/other/HotAngles/HAconfig/Tupfile.lua
Normal file
9
programs/other/HotAngles/HAconfig/Tupfile.lua
Normal file
@ -0,0 +1,9 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
--[[tup.foreach_rule(
|
||||
{"HACONFIG.asm"},
|
||||
"fasm %f %o " .. tup.getconfig("KPACK_CMD"),
|
||||
"%B"
|
||||
)
|
||||
]]--
|
||||
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "ru" or tup.getconfig("LANG")) .. " > lang.inc", {"lang.inc"})
|
||||
tup.rule({"HACONFIG.asm", extra_inputs = {"lang.inc"}}, "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "HACONFIG")
|
5
programs/other/HotAngles/HAconfig/build.bat
Normal file
5
programs/other/HotAngles/HAconfig/build.bat
Normal file
@ -0,0 +1,5 @@
|
||||
@echo lang fix ru >lang.inc
|
||||
@fasm.exe -m 16384 HACONFIG.asm HACONFIG
|
||||
@erase lang.inc
|
||||
@kpack HACONFIG
|
||||
@pause
|
204
programs/other/HotAngles/HAconfig/check.inc
Normal file
204
programs/other/HotAngles/HAconfig/check.inc
Normal file
@ -0,0 +1,204 @@
|
||||
;Ž¯â¨¬¨§¨à®¢ ë© ª®¬¯®¥â CheckBox (ˆáå®¤ë© ¢ ਠ⠮â Maxxxx32)
|
||||
;Ž¯â¨¬¨§¨à®¢ ¢ë¢®¤ áâப¨ ¤¯¨á¨ ¤«ï CheckBox'a + ⥯¥àì, ¯à¨ ¯à®¢¥àª¥ ¥ ¯à®¨á室¨â ¯®¤áç¥â ª®«-¢ ᨬ¢®«®¢ ¢ áâப¥
|
||||
;Ž¯â¨¬¨§ æ¨ï ª®¬ ¤ - ®âª § «áï ®â á®åà ¥¨ï ॣ¨áâ஢ ¢ á⥪¥.
|
||||
;21.02.2007 ¤®¡ ¢¨« ª®¤ ®â Heavyiron, ¤®¯¨á « ¬ ªà®áë ¤«ï ¨á¯®«ì§®¢ ¨ï á¨á⥬ëå 梥⮢
|
||||
;19.02.2007 ®¡é¥¥ ã«ãç襨¥ ª®¤ , 㬥ì襨¥ à §¬¥à ¨ ¨á¯®«ì§®¢ ¨¥ á¨á⥬ëå 梥⮢ ¤«ï ®â®¡à ¦¥¨ï checkbox
|
||||
;17.07.2006 ¯à®¨§¢¥¤¥ ®¯â¨¬¨§ æ¨ï, ¯à¨ ãáâ ®¢ª¥ 祪 ¡®ªá ¢ ¯®«®¦¥¨¥ ¢ª«î祮 ¯®á«¥¤ãî騥 祪 ¡®ªáë ¢ â®â ¦¥ ¯à®¬¥¦ã⮪ ¢à¥¬¥¨ ¥ ¯à®¢¥àïîâáï
|
||||
;22.08.2006 ¯à®¨§¢¥¤¥ ®¯â¨¬¨§ æ¨ï ª®¬ ¤, ¯à¨ïâë ¢® ¢¨¬ ¨¥ § ¬¥ç ¨ï DIAMOND' .
|
||||
;<Lrz> - ’¥¯«®¢ €«¥ªá¥© www.lrz.land.ru
|
||||
|
||||
macro version_ch ;¤«ï ᮢ¬¥á⨬®á⨠ᮠáâ à묨 ¢¥àá¨ï¬¨ checkbox ¢á¥ 梥⠧ ¤ îâáï àãçª ¬¨
|
||||
{
|
||||
ch_struc_size=24
|
||||
ch_left equ [edi] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® å
|
||||
ch_top equ [edi+2] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® ã
|
||||
ch_color equ [edi+4]
|
||||
ch_border_color equ [edi+8] ; or [edi+4] ;梥â à ¬ª¨ checkbox ¥¥ ¬®¦® § ¤ âì á ¬®áâ®ï⥫ì®
|
||||
ch_text_color equ [edi+12];[edi+4] ;梥â ⥪áâ
|
||||
ch_text_ptr equ [edi+16] ;㪠§ ⥫ì ç «® ⥪á⮢®© áâப¨
|
||||
ch_text_length equ [edi+20] ;¤«¨ ¤¯¨á¨ (2^64 â ª®© ¤«¨ë ¬®¦¥â ¡ëâì ⥪áâ)
|
||||
ch_flags equ [edi+22] ;ä« £¨
|
||||
}
|
||||
|
||||
macro version_ch1 ;¯à®¤¢¨ãâ ï ¢¥àá¨ï, ¨á¯®«ì§ã¥â 梥â ᪨ .
|
||||
{
|
||||
ch_struc_size=12
|
||||
ch_left equ [edi] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® å
|
||||
ch_top equ [edi+2] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® ã
|
||||
ch_color equ [sc.work] ;
|
||||
ch_border_color equ [sc.work_graph] ; or [edi+4] ;梥â à ¬ª¨ checkbox ¥¥ ¬®¦® § ¤ âì á ¬®áâ®ï⥫ì®
|
||||
ch_text_color equ [sc.work_text];[edi+4] ;梥â ⥪áâ
|
||||
ch_text_ptr equ [edi+4] ;㪠§ ⥫ì ç «® ⥪á⮢®© áâப¨
|
||||
ch_text_length equ [edi+8] ;¤«¨ ¤¯¨á¨ (2^64 â ª®© ¤«¨ë ¬®¦¥â ¡ëâì ⥪áâ)
|
||||
ch_flags equ [edi+10] ;ä« £¨
|
||||
}
|
||||
|
||||
macro use_check_box
|
||||
{
|
||||
ch_text_margin=4 ;à ááâ®ï¨¥ ®â ¯àאַ㣮«ì¨ª 祪 ¡®ªá ¤® ¤¯¨á¨
|
||||
ch_size=11 ;à §¬¥à ª¢ ¤à â 祪 ¡®ªá
|
||||
check_box:
|
||||
.draw:
|
||||
pusha ;á®åà ¨¬ ¢á¥ ॣ¨áâàë
|
||||
mov eax,13
|
||||
mov ebx,ch_left
|
||||
shl ebx,16
|
||||
add ebx,ch_size
|
||||
mov ecx,ch_top
|
||||
shl ecx,16
|
||||
add ecx,ch_size
|
||||
mov edx,ch_border_color
|
||||
mcall ;à¨á㥬 à ¬ªã
|
||||
|
||||
mov edx,ch_color
|
||||
add ebx,1 shl 16 - 2
|
||||
add ecx,1 shl 16 - 2
|
||||
mcall ;§ ªà 訢 ¥¬ ¢ãâ८á⨠祪¡®ªá
|
||||
|
||||
test word ch_flags,2 ;¤®áâ âì § 票¥ ¡¨â ¨§ ¯¥à¥¬¥®© ¨ ¯®¬¥áâ¨âì ¢ ä« £ CF
|
||||
jz @f ;¢ ¥á«¨ CF=1, â® ¢ë¯®«¨¬ á«¥¤ãîéãî ¯à®æ¥¤ãàã ¨ ç¥ ¯¥à¥©â¨ ¨¦îî @@
|
||||
call .draw_ch ; à¨á®¢ âì ¢ª«îç¥ë© 祪 ¡®ªá
|
||||
@@:
|
||||
;----------------------------
|
||||
;à áç¥â ªã¤ ¡ã¤¥â ¯à®¨§¢¥¤¥ ¢ë¢®¤ ⥪áâ
|
||||
;----------------------------
|
||||
movzx ebx,word ch_left ;§ £à㧨âì § 票¥ å ¤«ï 祪 ¡®ªá
|
||||
add ebx,(ch_size+ch_text_margin) ;¤®¡ ¢¨âì à §¬¥à áâ®à®ë ¨ à ááâ®ï¨¥ ª®â®à®¬ ç¥âáï ¢ë¢®¤ ⥪áâ
|
||||
shl ebx,16 ;ᤢ¨¥¬ 16 à §à冷¢ ¢ «¥¢® (㬮¦¨¬ 65536)
|
||||
mov bx,ch_top ;§ £à㧨¬ § 票¥ ¯® y
|
||||
add ebx,(ch_size-9+1) ;¤®¡ ¢¨¬ § 票¥ ¤«¨ë áâ®à®ë -9+1
|
||||
mov ecx,ch_text_color ;§ £à㧨¬ 梥⠤¯¨á¨
|
||||
|
||||
mov edx,ch_text_ptr ;㪠¦¥¬ ¤à¥á ®â ªã¤ 㦮 ¢ë¢®¤¨âì áâபã
|
||||
movzx esi,word ch_text_length ;‡ £à㧨¬ ¤«¨ã ¤¯¨á¨ ¢ esi
|
||||
;¢¥á¥¬ ¢ eax § 票¥ ¢ë¢®¤ ¤¯¨á¨ ª ¢ã
|
||||
mov eax,4
|
||||
mcall ;‚뢮¤
|
||||
popa ;¢®ááâ ®¢¨âì § 票ï ॣ¨áâ஢ ¨§ á⥪
|
||||
ret ;¢ë©¤¥¬ ¨§ ¯à®æ¥¤ãàë
|
||||
|
||||
.clear_ch: ;®ç¨á⪠祪 ¡®ªá
|
||||
mov edx,ch_color ;梥⠢ãâਠ祪 ¡®ªá
|
||||
jmp @f ;¡¥§ãá«®¢ë© ¯à릮ª ¨¦îî ¬¥âªã @@
|
||||
|
||||
.draw_ch: ; à¨á®¢ âì ¢ª«îç¥ë© 祪 ¡®ªá
|
||||
mov edx,ch_border_color ;§ £à㧨âì 梥â
|
||||
@@:
|
||||
movzx ebx,word ch_left ;§ £à㧨âì ª®®à¤¨ âã ¯® å
|
||||
add ebx,(ch_size/3) ;¤®¡ ¢¨âì (áâ®à® ¯àאַ㣮«ì¨ª /3)
|
||||
shl ebx,16 ;ᤢ¨¥¬ 16 à §à冷¢ ¢ «¥¢® (㬮¦¨¬ 65536)
|
||||
mov bx,(ch_size/2) ;§ £à㧨âì (áâ®à® ¯àאַ㣮«ì¨ª /2)
|
||||
mov bp,bx ;á®åà ¨¬ ॣ¨áâà bx ¢ ॣ¨áâॠ㪠§ â¥«ï ¡ §ë
|
||||
;push bx
|
||||
movzx ecx,word ch_top ;§ £à㧨âì ª®®à¤¨ âã ¯® ã
|
||||
mov eax,13 ;¢ eax - § 票ï äãªæ¨¨ ¤«ï ¢ë¢®¤ ¯®«®áë â.¥. ¯® áã⨠¯àאַ㣮«ì¨ª , ª®â®àë© ®â®¡à ¦ ¥â ¢ª«îç¥ë© ª®¬¯®¥â 祪 ¡®ªá
|
||||
add ecx,(ch_size/3) ;¤®¡ ¢¨âì (áâ®à® ¯àאַ㣮«ì¨ª /3)
|
||||
shl ecx,16 ;ᤢ¨¥¬ 16 à §à冷¢ ¢ «¥¢® (㬮¦¨¬ 65536)
|
||||
mov cx,bp ;§ £à㧨¬ § 票ï ॣ¨áâà 㪠§ â¥«ï ¡ §ë ¢ cx
|
||||
;pop cx
|
||||
mcall ;¢ë¢®¤
|
||||
ret ;¢ë©â¨ ¨§ ¯à®æ¥¤ãàë
|
||||
.mouse: ;®¡à ¡®âª ¬ëè¨
|
||||
pusha
|
||||
mov eax,37 ;¡ã¤¥¬ çâ® â® ¤¥« âì ¥á«¨ ã á çâ® - ¨âì ¦ â®
|
||||
mov ebx,2 ;¢¥á⨠¢ ॣ¨áâà § 票¥ 2
|
||||
mcall ;¯à®¢¥àª ¥ ¦ « «¨ ¯®«ì§®¢ â¥«ì ª®¯ªã ¬ë誨
|
||||
test eax,eax ;¯à®¢¥àª ¥á«¨ ã á ¢ eax=0, â® ãáâ ®¢¨¬ ä« £ ¨ ¢ë©¤¥¬
|
||||
jnz @f ;¯¥à¥©â¨ ¨¦îî ¬¥âªã @@
|
||||
btr word ch_flags,2 ;¨§¢«¥ç¥¨¥ § ç¥¨ï § ¤ ®£® ¡¨â ¢ ä« £ cf ¨ ¨§¬¥¥¨¥ ¥£® § 票ï ã«¥¢®¥.
|
||||
popa ;¥á«¨ ¨ç¥£® ¥ ¯à®¨§®è«®, â® ¢®ááâ ®¢¨¬ § 票ï ॣ¨áâ஢ ¨§ á⥪
|
||||
ret ;¢ë室
|
||||
@@:
|
||||
bts word ch_flags,2 ;¯à®¢¥àª ä« £ â.¥. ¯¥à¥®á ¢ cf § 票¥ ¡¨â ¨ ãáâ ®¢ª ¡¨â ¢ á®áâ®ï¨¥ ¢ª«î祮
|
||||
jc .mouse_end ;¥á«¨ CF=1 â® ¯¥à¥©â¨ ¢ ª®¥æ â.¥. íâ® ¢ë室
|
||||
movzx esi,word ch_text_length ;§ £à㧨âì ª®«-¢® ᨬ¢®«®¢ ¢ ⥪á⮢®© áâப¥
|
||||
;“¬®¦¥¨¥ 6 <EFBFBD>ëáâ஥ 㬮¦¥¨¥ ¬®¦® ¢®á¯®«ì§®¢ âìáï «î¡ë¬ ¬§ ¬¥â®¤®¢, ® áâ àëå <EFBFBD>à®æ¥áá®à å (386,486,P1)¡ëáâ॥ ¡ã¤¥â á ¨áâàãªæ¨¥© Lea
|
||||
;lea esi,[eax*2+eax]
|
||||
;shl eax,1
|
||||
imul esi,6 ; ¨«¨ ¬®¦® ¨ â ª 㬮¦¨âì 6
|
||||
add esi,ch_text_margin ;¤®¡ ¢¨âì 3 - à ááâ®ï¨¥ ®â 祪 ¡®ªá ¤® ¤¯¨á¨
|
||||
|
||||
mov eax,37 ;¯®«ã稬 ª®®à¤¨ âë ¬ë誨
|
||||
mov ebx,1 ;¤®¡ ¢¨âì 1
|
||||
mcall ;¯®«ãç¨âì ª®®à¤¨ âë ªãàá®à ®â®á¨â¥«ì® ®ª
|
||||
|
||||
movzx ebx,word ch_top ;§ £à㧨âì ¢ bx § 票¥ ª®®à¤¨ âë ã
|
||||
cmp ax,bx ;áà ¢¨âì á á ª®®à¤¨ ⮩ ªãàá®à
|
||||
jl .mouse_end ;SF <> OF ¥á«¨ ¬¥ìè¥
|
||||
add ebx,ch_size ;¤®¡ ¢¨âì à §¬¥à
|
||||
cmp ax,bx ;áà ¢¨âì
|
||||
jg .mouse_end ;ZF = 0 ¨ SF = OF ¥á«¨ ¡®«ìè¥
|
||||
|
||||
shr eax,16 ;à §¤¥«¨¬ 65536 ¨«¨ ¯à®á⮠ᤢ¨¥¬ ¡¨âë 16 § 票©
|
||||
movzx ebx,word ch_left ;¯à®¨§¢¥¤¥¬ «®£¨ç®¥ áà ¢¥¨¥
|
||||
cmp ax,bx ;áà ¢¨âì ॣ¨áâàë
|
||||
jl .mouse_end ;¥á«¨ ¬¥ìè¥
|
||||
add ebx,ch_size ;¤®¡ ¢¨âì ¤«¨ã áâ®à®ë ¯àאַ㣮«ì¨ª
|
||||
add ebx,esi ;“ç¥áâì ¢ § 票¨ ¯® å ¥é¥ ¨ ¤«¨ã ¤¯¨á¨ ª 祪¡®ªáã
|
||||
cmp ax,bx ;áâà ¢¨âì ॣ¨áâàë
|
||||
jg .mouse_end ;¥á«¨ ¡®«ìè¥
|
||||
|
||||
bts word ch_flags,1 ;¨§¢«¥ç¥¨¥ § ç¥¨ï § ¤ ®£® ¡¨â ¢ ä« £ cf ¨ ¨§¬¥¥¨¥ ¥£® § 票ï 1.
|
||||
jc @f ;CF=1 â® ¯¥à¥©â¨ ¨¦îî @@
|
||||
|
||||
call .draw_ch ;®â®¡à §¨âì ¢ª«îç¥ë© 祪 ¡®ªá
|
||||
mov dword [esp+24],1 ;¤ «ì¥©è ï ¯à®¢¥àª 祪 ¡®ªá®¢ ¡¥á¬ëá«¥ , ¯® í⮬㠢 á⥪, £¤¥ à ᯮ« £ ¥âáï ecx ¯®¬¥áâ¨â¬ 0
|
||||
jmp .mouse_end ;¢ë©â¨
|
||||
@@:
|
||||
btr word ch_flags,1 ;¨§¢«¥ç¥¨¥ § ç¥¨ï § ¤ ®£® ¡¨â ¢ ä« £ cf ¨ ¨§¬¥¥¨¥ ¥£® § 票ï ã«¥¢®¥.
|
||||
call .clear_ch ;¢ëª«îç¨âì 祪 ¡®ªá â.¥. ¬¥á⥠§ ªà 襮£® ¯àאַ㣮«ì¨ª ®â®¡à §¨âì 梥â ä® .
|
||||
.mouse_end:
|
||||
popa ;¢®ááâ ®¢¨âì ॣ¨áâàë ¨§ á⥪
|
||||
ret ;¢ë©â¨
|
||||
}
|
||||
|
||||
struc check_box1 left,top,text,text_length,flags
|
||||
{ ;áâàãªâãà ¯ à ¬¥â஢ ¤«ï 祪 ¡®ªá
|
||||
.left: dw left ;+0 ¯®«®¦¥¨¥ ¯® å
|
||||
.top: dw top ;+2 ¯®«®¦¥¨¥ ¯® ã
|
||||
.text: dd text ;+16 ¤à¥á ¢ ª®¤¥ ¯à®£à ¬¬ë £¤¥ à ᯮ«®¦¥ ⥪áâà
|
||||
.text_length: dw text_length ;+20 ¤«¨ ⥪áâ
|
||||
.flags: dw flags+0 ;+22 ä« £¨
|
||||
}
|
||||
struc check_box left,top,color,border_color,text_color,text,text_length,flags
|
||||
{ ;áâàãªâãà ¯ à ¬¥â஢ ¤«ï 祪 ¡®ªá
|
||||
.left: dw left ;+0 ;¯®«®¦¥¨¥ ¯® å
|
||||
.top: dw top ;¯®«®¦¥¨¥ ¯® ã
|
||||
.color: dd color ;梥⠢ãâਠ祪¡®ªá
|
||||
.border_color: dd border_color ;梥â à ¬ª¨
|
||||
.text_color: dd text_color ;梥⠤¯¨á¨
|
||||
.text: dd text ; ¤à¥á ¢ ª®¤¥ ¯à®£à ¬¬ë £¤¥ à ᯮ«®¦¥ ⥪áâ
|
||||
.text_length: dw text_length ;¤«¨ ⥪áâ
|
||||
.flags: dw flags+0 ;+22
|
||||
}
|
||||
ch_flag_en=10b
|
||||
|
||||
macro draw_check_boxes start,end ;à¨á®¢ âì 祪 ¡®ªáë
|
||||
{
|
||||
mov edi,start ;“ª § ⥫ì ç «® ¤ ëå 祪 ¡®ªá®¢ â.¥. ç «® ¤ ëå ¯¥à¢®£® 祪¡®ªá
|
||||
mov ecx,((end-start)/ch_struc_size) ;Š®«¨ç¥á⢮ 祪 ¡®ªá®¢
|
||||
@@:
|
||||
call check_box.draw ;Žâ®¡à §¨âì 祪 ¡®ªá
|
||||
add edi,ch_struc_size ;“ª § â¥«ì ¯®á«¥¤ãî騥 祪 ¡®ªáë â.¥. +28
|
||||
loop @b ;¯àë£ãâì ¥á«¨ ¢ ecx/cx § 票¥ ¥ 0 ¢¥àåîî @@
|
||||
}
|
||||
macro mouse_check_boxes start,end ;ãáâ ®¢ª 祪 ¡®ªá®¢, ¢ § ¢¨á¨¬®á⨠®â ᮡëâ¨ï
|
||||
{
|
||||
mov edi,start ; “ª § ⥫ì ç «® ¤ ëå 祪 ¡®ªá®¢ â.¥. ç «® ¤ ëå ¯¥à¢®£® 祪¡®ªá
|
||||
mov ecx,((end-start)/ch_struc_size) ;Š®«¨ç¥á⢮ 祪 ¡®ªá®¢
|
||||
@@:
|
||||
call check_box.mouse ;¯à®¢¥àª ¬ë誨 ¨ ®¡à ¡®âª ᮡë⨩
|
||||
add edi,ch_struc_size ;“ª § â¥«ì ¯®á«¥¤ãî騥 祪 ¡®ªáë
|
||||
loop @b ;¯àë£ãâì ¥á«¨ ¢ ecx/cx § 票¥ ¥ 0 ¢¥àåîî @@
|
||||
}
|
||||
;…᫨ 㦮 ®â®¡à §¨âì ®¤¨ 祪¥à
|
||||
macro draw_check_box start ;à¨á®¢ âì 祪 ¡®ªáë
|
||||
{
|
||||
mov edi,start ;“ª § ⥫ì ç «® ¤ ëå 祪 ¡®ªá®¢ â.¥. ç «® ¤ ëå ¯¥à¢®£® 祪¡®ªá
|
||||
call check_box.draw ;Žâ®¡à §¨âì 祪 ¡®ªá
|
||||
}
|
||||
macro mouse_check_box start ;ãáâ ®¢ª 祪 ¡®ªá®¢, ¢ § ¢¨á¨¬®á⨠®â ᮡëâ¨ï
|
||||
{
|
||||
mov edi,start ; “ª § ⥫ì ç «® ¤ ëå 祪 ¡®ªá®¢ â.¥. ç «® ¤ ëå ¯¥à¢®£® 祪¡®ªá
|
||||
call check_box.mouse ;¯à®¢¥àª ¬ë誨 ¨ ®¡à ¡®âª ᮡë⨩
|
||||
}
|
271
programs/other/HotAngles/HAconfig/editbox.inc
Normal file
271
programs/other/HotAngles/HAconfig/editbox.inc
Normal file
@ -0,0 +1,271 @@
|
||||
; SEE YOU File FAQ.txt and HISTORY. Good Like!
|
||||
;;;;;;;;;;;;;;;;;;
|
||||
include 'editbox.mac' ;¬ ªà®á ª®â®àë© ¤®«¦¥ ®¡«¥£ç¨âì ¦¨§ì :) á¯¥æ¨ «ì® ¤«ï editbox
|
||||
;;;;;;;;;;;;;;;;;;
|
||||
macro use_edit_box
|
||||
{
|
||||
edit_box:
|
||||
ed_width equ [edi] ;è¨à¨ ª®¬¯®¥â
|
||||
ed_left equ [edi+4] ;¯®«®¦¥¨¥ ¯® ®á¨ å
|
||||
ed_top equ [edi+8] ;¯®«®¦¥¨¥ ¯® ®á¨ ã
|
||||
ed_color equ [edi+12] ;梥â ä® ª®¬¯®¥â
|
||||
shift_color equ [edi+16] ;=0x6a9480
|
||||
ed_focus_border_color equ [edi+20] ;梥â à ¬ª¨ ª®¬¯®¥â
|
||||
ed_blur_border_color equ [edi+24] ;梥⠥ ªâ¨¢®£® ª®¬¯®¥â
|
||||
ed_text_color equ [edi+28] ;梥â ⥪áâ
|
||||
ed_max equ [edi+32] ;ª®«-¢® ᨬ¢®«®¢ ª®â®àë¥ ¬®¦® ¬ ªá¨¬ «ì® ¢¢¥áâ¨
|
||||
ed_text equ [edi+36] ;㪠§ â¥«ì ¡ãä¥à
|
||||
ed_flags equ [edi+40] ;ä« £¨
|
||||
ed_size equ [edi+44] ;ª®«-¢® ᨬ¢®«®¢
|
||||
ed_pos equ [edi+48] ;¯®§¨æ¨ï ªãàá®à
|
||||
ed_offset equ [edi+52] ;ᬥ饨¥
|
||||
cl_curs_x equ [edi+56] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® å
|
||||
cl_curs_y equ [edi+60] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® ã
|
||||
ed_shift_pos equ [edi+64] ;¯®«®¦¥¨¥ ªãàá®à
|
||||
ed_shift_pos_old equ [edi+68] ;áâ ஥ ¯®«®¦¥¨¥ ªãàá®à
|
||||
;==========================================================
|
||||
;=== ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ =================================
|
||||
;==========================================================
|
||||
.draw:
|
||||
pushad
|
||||
;--- à¨á㥬 à ¬ªã ---
|
||||
call .draw_border ; ”ãªæ¨ï áâ ¡¨«ì
|
||||
.draw_bg_cursor_text:
|
||||
;--- ¨§¬¥ï¥¬ ᬥ饨¥, ¥á«¨ ¤® ---
|
||||
call .check_offset ;¢ëç¨á«¥¨¥ ¯®§¨æ¨¨ ªãàá®à áâ ¡¨«ì
|
||||
;--- à¨á㥬 ¢ãâà¥îî ®¡« áâì ---
|
||||
call .draw_bg ; à¨á®¢ âì ¯àאַ㣮«ì¨ª à ¡®ç¥© ®¡« áâ¨
|
||||
;---- à¨á㥬 ¢ë¤¥«¥¨¥, ¯® shift ¥á«¨ ¥áâì
|
||||
call .draw_shift
|
||||
.draw_cursor_text:
|
||||
;--- à¨á㥬 ªãàá®à ---
|
||||
;--- ¬®¦¥â ¥£® ¥ ¤® à¨á®¢ âì ----
|
||||
test word ed_flags,ed_focus
|
||||
je @f
|
||||
call .draw_cursor
|
||||
@@:
|
||||
call .draw_text
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Ž¡é¨© ¢ë室 ¨§ editbox ¤«ï ¢á¥å äãªæ¨© ¨ ¯®áâ ®¡à ¡®â稪®¢
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
.editbox_exit:
|
||||
edit_ex
|
||||
;==========================================================
|
||||
;=== ®¡à ¡®âª ª« ¢¨ âãàë =================================
|
||||
;==========================================================
|
||||
.key:
|
||||
pushad
|
||||
test word ed_flags,ed_focus ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬
|
||||
je .editbox_exit
|
||||
test word ed_flags,ed_mouse_on
|
||||
jne .editbox_exit
|
||||
|
||||
;<EFBFBD>஢¥àª ¦ â shift ?
|
||||
call .check_shift
|
||||
;----------------------------------------------------------
|
||||
;--- ¯à®¢¥à塞, çâ® ¦ â® --------------------------------
|
||||
;----------------------------------------------------------
|
||||
use_key_process backspase,delete,left,right,home,end,insert
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;‡ £«ãèª ®¡à ¡®âªã ª« ¢¨è ¢¢¥àå ¨ ¢¨§ â.¥. ¯à¨ ®¡ à㦥¨¨ íâ¨å ª®¤®¢ ¯à®¨á室¨â ¢ë室 ¨§ ®¡à ¡®â稪
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
use_key_no_process up,down,esc,enter,tab,numl,capsl,scrolll
|
||||
;--- ¦ â ¤àã£ ï ª« ¢¨è ---
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;<EFBFBD>஢¥àª ãáâ ®¢«¥ «¨ ä« £ ¯à¨ ª®â®à®¬ 㦮 ¢ë¢®¤¨âì ⮫쪮 æ¨äàë ¢ 㦮¬ ¡®ªá¥ ¥á«¨ â ª®©¥®¡å®¤¨¬®á⨠¥â 㦮 § ª®¬¥â¨à®¢ âì ¬ ªà®á
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
use_key_figures_only
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;¯à®¢¥àª shift ¡ë« «¨ ¦ â
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
are_key_shift_press
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; ¯à®¢¥à塞, 室¨âáï «¨ ªãàá®à ¢ ª®æ¥ + ¤ «ì¥©è ï ®¡à ¡®âª
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
are_key_cur_end
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Ž¡à ¡®âª ª« ¢¨è insert,delete.backspase,home,end,left,right
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
use_work_key
|
||||
;==========================================================
|
||||
;=== ®¡à ¡®âª ¬ëè¨ =======================================
|
||||
;==========================================================
|
||||
.mouse:
|
||||
pushad
|
||||
;debug
|
||||
;----------------------------------------------------------
|
||||
;--- ¯®«ãç ¥¬ á®áâ®ï¨¥ ª®¯®ª ¬ëè¨ -----------------------
|
||||
;----------------------------------------------------------
|
||||
mcall 37,2
|
||||
;----------------------------------------------------------
|
||||
;--- ¯à®¢¥à塞 á®áâ®ï¨¥ ----------------------------------
|
||||
;----------------------------------------------------------
|
||||
test eax,1
|
||||
jnz .mouse_left_button
|
||||
and word ed_flags,ed_mouse_on_off
|
||||
xor ebx,ebx
|
||||
mov dword [mouse_flag],ebx
|
||||
jmp .editbox_exit
|
||||
.mouse_left_button:
|
||||
;----------------------------------------------------------
|
||||
;--- ¡«®ª¨à®¢ª ®â 䮪ãá¨à®¢ª¨ ¢ ¤àã£¨å ¡®ªá å ¯à¨ ¯®¯ ¤ ¨¨ ¨å ªãàá®à
|
||||
;----------------------------------------------------------
|
||||
mov eax,dword [mouse_flag]
|
||||
test eax,eax
|
||||
jz @f
|
||||
cmp eax,edi
|
||||
je @f
|
||||
jmp ._blur
|
||||
;----------------------------------------------------------
|
||||
;--- ¯®«ãç ¥¬ ª®®à¤¨ âë ¬ëè¨ ®â®á¨â¥«ì® ®ª
|
||||
;----------------------------------------------------------
|
||||
@@: mcall 37,1
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;”ãªæ¨ï ®¡à ¡®âª¨ ¬ë誨 ¯®«ã票¥ ª®®à¤¨ â ¨ ¯à®¢¥àª ¨å + ¢ë¤¥«¥¨ï
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
use_work_mouse
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Ž¡é¨¥ äãªæ¨¨ ®¡à ¡®âª¨
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
use_general_func
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;”ãªæ¨¨ ¤«ï à ¡®âë á key
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
use_key_func
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;”ãªæ¨¨ ¤«ï à ¡®âë á mouse
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
use_mouse_func
|
||||
}
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Bit mask from editbox
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
ed_figure_only= 1000000000000000b ;®¤¨ ᨬ¢®«ë
|
||||
ed_always_focus= 100000000000000b
|
||||
ed_focus= 10b ;䮪ãá ¯à¨«®¦¥¨ï
|
||||
ed_shift_on= 1000b ;¥á«¨ ¥ ãáâ ®¢«¥ -§ ç¨â ¢¯¥à¢ë¥ ¦ â shift,¥á«¨ ¡ë« ãáâ ®¢«¥, § ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift
|
||||
ed_shift_on_off=1111111111110111b
|
||||
ed_shift= 100b ;¢ª«îç ¥âáï ¯à¨ ¦ ⨨ shift â.¥. ¥á«¨ ¦¨¬ î
|
||||
ed_shift_off= 1111111111111011b
|
||||
ed_shift_bac= 10000b ;¡¨â ¤«ï ®ç¨á⪨ ¢ë¤¥«¥®£® shift â.¥. ¯à¨ ãáâ ®¢ª¥ £®¢®à¨â çâ® ¥áâì ¢ë¤¥«¥¨¥
|
||||
ed_shift_bac_cl=1111111111101111b ;®ç¨á⪠¯à¨ 㤠«¥¨¨ ¢ë¤¥«¥¨ï
|
||||
ed_shift_cl= 1111111111100011b
|
||||
ed_shift_mcl= 1111111111111011b
|
||||
ed_left_fl= 100000b
|
||||
ed_right_fl= 1111111111011111b
|
||||
ed_offset_fl= 1000000b
|
||||
ed_offset_cl= 1111111110111111b
|
||||
ed_insert= 10000000b
|
||||
ed_insert_cl= 1111111101111111b
|
||||
ed_mouse_on = 100000000b
|
||||
ed_mous_adn_b= 100011000b
|
||||
ed_mouse_on_off=1111111011111111b
|
||||
ed_height=14 ; ¢ëá®â
|
||||
macro draw_edit_boxes start,_end
|
||||
{
|
||||
mov edi,start
|
||||
mov ecx,((_end-start)/ed_struc_size)
|
||||
@@:
|
||||
call edit_box.draw
|
||||
add edi,ed_struc_size
|
||||
loop @b
|
||||
}
|
||||
|
||||
macro mouse_edit_boxes start,_end
|
||||
{
|
||||
mov edi,start
|
||||
mov ecx,((_end-start)/ed_struc_size)
|
||||
@@:
|
||||
call edit_box.mouse
|
||||
add edi,ed_struc_size
|
||||
loop @b
|
||||
}
|
||||
|
||||
macro key_edit_boxes start,end
|
||||
{
|
||||
mov edi,start
|
||||
mov ecx,((end-start)/ed_struc_size)
|
||||
@@:
|
||||
call edit_box.key
|
||||
add edi,ed_struc_size
|
||||
loop @b
|
||||
}
|
||||
ed_struc_size=72
|
||||
struc edit_box width,left,top,color,shift_color,focus_border_color,\
|
||||
blur_border_color,text_color,max,text,flags,size,pos
|
||||
{
|
||||
.width dd width
|
||||
.left dd left
|
||||
.top dd top
|
||||
.color dd color
|
||||
.shift_color dd shift_color
|
||||
.focus_border_color dd focus_border_color
|
||||
.blur_border_color dd blur_border_color
|
||||
.text_color dd text_color
|
||||
.max dd max
|
||||
.text dd text
|
||||
.flags dd flags+0
|
||||
.size dd size+0
|
||||
.pos dd pos+0
|
||||
.offset dd 0
|
||||
.cl_curs_x dd 0
|
||||
.cl_curs_y dd 0
|
||||
.shift dd 0
|
||||
.shift_old dd 0
|
||||
}
|
||||
|
||||
|
||||
macro edit_boxes_set_sys_color start,end,color_table
|
||||
{
|
||||
mov edi,start
|
||||
mov ecx,((end-start)/ed_struc_size)
|
||||
mov esi,color_table
|
||||
@@:
|
||||
mov eax,[esi+36]
|
||||
mov ebx,[esi+20]
|
||||
mov ed_focus_border_color,eax
|
||||
shr bh,1
|
||||
shr bl,1
|
||||
shr ah,1
|
||||
shr al,1
|
||||
add ah,bh
|
||||
add al,bl
|
||||
ror eax,16
|
||||
ror ebx,16
|
||||
shr bl,1
|
||||
shr al,1
|
||||
add al,bl
|
||||
ror eax,16
|
||||
mov ed_blur_border_color,eax
|
||||
add edi,ed_struc_size
|
||||
loop @b
|
||||
}
|
||||
|
||||
macro draw_edit_box ed_ptr
|
||||
{
|
||||
mov edi,ed_ptr
|
||||
call edit_box.draw
|
||||
}
|
||||
|
||||
macro mouse_edit_box ed_ptr
|
||||
{
|
||||
mov edi,ed_ptr
|
||||
call edit_box.mouse
|
||||
}
|
||||
|
||||
macro key_edit_box ed_ptr
|
||||
{
|
||||
mov edi,ed_ptr
|
||||
call edit_box.key
|
||||
}
|
||||
macro default_box ed_ptr
|
||||
{
|
||||
pusha
|
||||
; xor eax,eax
|
||||
; mov ed_shift_pos,eax
|
||||
; mov ed_shift_pos_old,eax
|
||||
and word ed_flags,ed_shift_cl
|
||||
; mov ed_offset,eax
|
||||
popa
|
||||
}
|
1145
programs/other/HotAngles/HAconfig/editbox.mac
Normal file
1145
programs/other/HotAngles/HAconfig/editbox.mac
Normal file
File diff suppressed because it is too large
Load Diff
75
programs/other/HotAngles/ReadMe.txt
Normal file
75
programs/other/HotAngles/ReadMe.txt
Normal file
@ -0,0 +1,75 @@
|
||||
Hot Angles
|
||||
|
||||
Version 0.1: Sep 18, 2018
|
||||
RU
|
||||
|
||||
Комплект утилит (аналог Hot Corners в других ОС) для расширения возможностей рабочего стола пользователя. Название выбрано путём голосования. В комплект входят две утилиты:
|
||||
@HOTANGLES - основная утилита, позволяющая запускать приложения путём наведения курсора в угол экрана (угол рабочей области);
|
||||
HACONFIG - утилита конфигуратор, позволяющая настроить действия на каждый угол и активировать/деактивировать эту опцию.
|
||||
Файл конфигурации: RD/1/SETTINGS/HOTANGLES.CFG (где RD/1/ это тот же SYS - путь к системной директории). Файл состоит из пяти строк:
|
||||
1) состояние активности опции: y - опция активна, n или любой другой символ - опция отключена;
|
||||
2) команда (полное имя приложения) для верхнего левого угла экрана;
|
||||
3) команда (полное имя приложения) для левого нижнего угла экрана;
|
||||
4) команда (полное имя приложения) для правого верхнего угла экрана;
|
||||
5) команда (полное имя приложения) для правого нижнего угла экрана.
|
||||
Если необходимо настроить только часть углов, а остальные оставить без действия, то в конфигураторе или на нужной строке конфигурационного файла укажите знак минус (символ '-').
|
||||
|
||||
Обе утилиты содержат защиту от повторного запуска.
|
||||
Утилита @HOTANGLES добавлена в автозагрузку ОС.
|
||||
@HOTANGLES не запустится, если конфигурационный файл отсутствует или был переименован.
|
||||
HACONFIG при отсутствии конфигурационного файла выставляет все поля по умолчанию, но не создаёт файл конфигурации самостоятельно (для этого необходимо нажать кнопку "Применить", тогда отсутствующий файл конфигурации будет создан, а существующий перезаписан).
|
||||
При первом старте утилиты все углы рабочей области настроены на запуск конфигуратора, где вы можете настроить утилиту под себя или отключить её.
|
||||
|
||||
Прочие рекомендации:
|
||||
Некоторым пользователям может быть удобно настроить открытие меню при попадании в угол его расположения. Например, если у вас кнопка "Меню" рассположена в левом нижнем углу, то задайте для этого угла команду:
|
||||
/rd/1/@MENU
|
||||
|
||||
Влияние на производительность:
|
||||
Если вы используете систему в задачах реального времени или в задачах с высокой нагрузкой на CPU отключите эту опцию. Так же, если вы желаете добиться максимальной скорости работы ОС, то использование этой опции не рекомендуется.
|
||||
Приложение может увеличивать нагрузку на систему в два раза при обычном использовании мыши (перемещение курсора, клики в определённых областях экрана).
|
||||
При выполнении основной функции (запуск любого приложения при наведении курсора в угол экрана) нагрузка на систему возрастает естественным образом.
|
||||
|
||||
Известные недоработки, которые будут исправлены в следующих версиях:
|
||||
[-] отсутствие русского языка;
|
||||
[-] используется маленький шрифт текста;
|
||||
[-] нет возможности запуска приложения с параметрами;
|
||||
[-] знак минус не влияет на попытку запуска в конкретном углу;
|
||||
[-] пустое поле в конфигураторе и пустая строка в конфигурационном файле неверно обрабатываются;
|
||||
[-] присутствует неисправленный баг в компоненте EditBox;
|
||||
[-] приложение конфигуратора не добавлено в системную панель.
|
||||
|
||||
Поддержать разработчика, ссылка для доната:
|
||||
https://money.yandex.ru/to/410011935289152
|
||||
|
||||
По найденным ошибкам, вопросам технической помощи и поддержки обращайтесь на
|
||||
E-Mail: theonlymirage@gmail.com
|
||||
|
||||
Процесс создания Hot Angles частично запечатлён на видео:
|
||||
https://youtu.be/l6mZflqOTJo
|
||||
https://youtu.be/ssYuJSoBGrk
|
||||
https://youtu.be/4slBjIoYJis
|
||||
https://youtu.be/N69_Cky1vB0
|
||||
|
||||
|
||||
Утилиты полностью написаны на FASM. Автор: Сергей Ефременков.
|
||||
Лицензионное соглашение:
|
||||
|
||||
Copyright (c) 2018, Efremenkov Sergey aka TheOnlyMirage
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
* Neither the name of the <organization> nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
Loading…
Reference in New Issue
Block a user