kolibrios-fun/programs/media/scrshoot/scrshoot.mac

269 lines
5.3 KiB
Plaintext
Raw Normal View History

;In this file content a macros need for compilation the scrshoot
evm_redraw equ 1
evm_key equ 10b
evm_button equ 100b
evm_mouse equ 100000b
evm_ipc equ 1000000b
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ---
macro draw_status text_ptr
{
mov [status.text],dword text_ptr
call send_draw_status
}
macro start_draw_window
{
;mov eax,12
push 12
pop eax
xor ebx,ebx
inc ebx
mcall
}
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ---
macro stop_draw_window
{
;mov eax,12
push 12
pop eax
;mov ebx,2
push 2
pop ebx
mcall
}
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---
macro wait_event redraw,key,button,mouse,ipc,other
{
mov eax,10
mcall
dec ax
if redraw eq
else
jz redraw
end if
dec ax
if key eq
else
jz key
end if
dec ax
if button eq
else
jz button
end if
dec ax
dec ax
dec ax
if mouse eq
else
jz mouse
end if
if ipc eq
else
dec ax
jz ipc
end if
if other eq
jmp still
else
jmp other
end if
}
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---
macro set_events_mask mask
{
;mov eax,40
push 40
pop eax
;mov ebx,mask
push mask
pop ebx
mcall
}
;macro check_boxes_set_sys_color start,end,color_table
;{
;ch_left equ [edi] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
;ch_top equ [edi+4] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
;ch_text_margin equ [edi+8] ;=4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;ch_size equ [edi+8] ;12 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
;ch_color equ [edi+12] ;<3B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> checkbox
;ch_border_color equ [edi+16] ; or [edi+4] ;<3B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> checkbox <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;ch_text_color equ [edi+20];[edi+4] ;<3B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;ch_text_ptr equ [edi+24] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;ch_text_length equ [edi+28]
;ch_flags equ [edi+32] ;<3B><><EFBFBD><EFBFBD><EFBFBD>
;ch_left equ [edi] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
;ch_top equ [edi+2] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
;ch_color equ [edi+4] ;<3B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> checkbox
;ch_border_color equ [edi+8] ;<3B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> checkbox
;ch_text_color equ [edi+12] ;<3B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;ch_text_ptr equ [edi+16] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;ch_text_length equ [edi+20] ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (2^64 <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>)
;ch_flags equ [edi+24] ;<3B><><EFBFBD><EFBFBD><EFBFBD>
; mov edi,start
; mov ecx,((end-start)/ch_struc_size)
; mov esi,color_table
;@@:
; push dword [esi+32]
; pop dword ch_text_color
; push dword [esi+36]
; pop dword ch_border_color
; add edi,ch_struc_size
; loop @b
;}
macro get_key
{
;mov eax,2
push 2
pop eax
mcall
}
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---
macro get_pressed_button
{
;mov eax,17
push 17
pop eax
mcall
}
macro get_active_window
{
mov eax,18
mov ebx,7
mcall
}
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0ACA0><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---
macro get_procinfo proc_inf_buf,slot_num
{
;mov eax,9
push 9
pop eax
;mov ebx,proc_inf_buf
push proc_inf_buf
pop ebx
if slot_num eq
xor ecx,ecx
dec ecx
else
;mov ecx,slot_num
push slot_num
pop ecx
end if
mcall
}
macro get_screen_prop struc_ptr
{
mov eax,61
push eax eax
xor ebx,ebx
inc ebx
mcall
mov [struc_ptr],eax
pop eax
inc ebx
mcall
mov [struc_ptr+4],ax
pop eax
inc ebx
mcall
mov [struc_ptr+6],eax
}
macro min_window
{
mov eax,18
mov ebx,10
mcall
}
macro app_close
{
or eax,-1
mcall
}
macro get_skin_height
{
mov eax,48
mov ebx,4
mcall
}
macro delay time
{
mov eax,5
if time eq
else
mov ebx,time
end if
mcall
}
macro activ_window slot_n
{
mov eax,18
mov ebx,3
if slot_n eq
else
mov ecx,slot_n
end if
mcall
}
struc screen_prop
{
.height: dw ? ;+0
.width: dw ? ;+2
.bitspp: dw ? ;+4
.bytesps: dd ?;+6
}
struc sys_color_table
{
.frames: dd ? ;+0
.grab: dd ? ;+4
.grab_button: dd ? ;+8
.grab_button_text: dd ? ;+12
.grab_text: dd ? ;+16
.work: dd ? ;+20
.work_button: dd ?;+24
.work_button_text: dd ? ;+28
.work_text: dd ? ;+32
.work_graph: dd ? ;+36
}
struc procinfo
{
.takts_per_second: dd ?
.window_stack_pos: dw ?
.slot_number: dw ?
dw ?
.name: rb 11
.align: db ?
.addres: dd ?
.use_mem: dd ?
.pid: dd ?
.left: dd ?
.top: dd ?
.width: dd ?
.height: dd ?
.slot_state: dw ?
rb (1024-56)
}
struc ipc_buffer size
{
.block: dd ?
.in_use: dd ?
.messages: rb size
}
;--- 梥<><E6A2A5> ---
cl_white=0xffffff
cl_black=0x000000
ch_struc_size=36