/programs/media/animage/trunk/animage.asm |
---|
32,8 → 32,13 |
use32 |
org 0x0 |
db 'MENUET01' |
dd 1, START, IM_END, I_END |
dd stacktop, file_path, cur_dir_path |
dd 0x1 |
dd START |
dd IM_END |
dd I_END |
dd stacktop |
dd file_path ;parameters |
dd cur_dir_path |
include '../../../config.inc' ;for nightbuild |
include '../../../macros.inc' |
42,7 → 47,6 |
include '../../../develop/libraries/box_lib/load_lib.mac' |
include '../../../dll.inc' |
include '../../../libio.inc' |
;include '../../../develop/libraries/libs-dev/libimg/libimg.inc' |
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load |
137,7 → 141,8 |
call copy_str_1 |
@@: |
;OpenDialog initialisation |
stdcall [OpenDialog_Init], OpenDialog_data |
push dword OpenDialog_data |
call [OpenDialog_Init] |
;--------------------------------------------------------------------- |
red: |
call drawwin |
203,7 → 208,7 |
;---------------------------------------------------------- |
;-------------------ICON"S picture------------------------- |
;---------------------------------------------------------- |
align 4 |
dd 0 |
panel_picture: |
file 'panel_buttons.png' |
.end: |
279,7 → 284,12 |
Icon_Y rd 1 |
counter rd 1 |
counter2 rd 1 |
Icon_text_x rd 1 |
Icon_text_y rd 1 |
Panel_flag rb 1 |
counter_menu rd 1 |
menu_coordinat_x rd 1 |
menu_size_x rd 1 |
menu_counter rd 1 |
counter_11 rd 1 |
number_panel rd 1 |
/programs/media/animage/trunk/design.inc |
---|
200,29 → 200,88 |
call draw_line |
ret |
;---------------------------------------------------------- |
;input: |
; eax - rectangle X |
; ebx - rectangle Y |
; ecx - point X |
; edx - point Y |
; esi - rectangle size X |
; edi - rectangle size Y |
;output: |
; eax - 1 if point in rectangle |
rectangle: |
no_light_rectangle: |
mov [line_x],eax |
mov [line_y],ebx |
mov [line_size_x],ecx |
mov [line_size_y],edx |
mov edx,esi |
mov ebx,[line_x] |
mov ecx,[line_y] |
shl ebx,16 |
shl ecx,16 |
add ebx,[line_size_x] |
add ecx,[line_size_y] |
mcall SF_DRAW_RECT |
ret |
;---------------------------------------------------------- |
draw_conture: |
mov [line_x],eax |
mov [line_y],ebx |
mov [line_size_x],ecx |
mov [line_size_y],edx |
mov [color_line1],0xaeabae |
;line 1 |
mov edx,[color_line1] |
mov ebx,[line_x] |
mov ecx,[line_y] |
shl ebx,16 |
shl ecx,16 |
add ebx,[line_x] |
add ecx,[line_y] |
add ebx,[line_size_x] |
call draw_line |
;line 2 |
mov edx,[color_line1] |
mov ebx,[line_x] |
mov ecx,[line_y] |
shl ebx,16 |
shl ecx,16 |
add ebx,[line_x] |
add ecx,[line_y] |
add ecx,[line_size_y] |
call draw_line |
;line 3 |
mov edx,[color_line1] |
mov ebx,[line_x] |
mov ecx,[line_y] |
add ecx,[line_size_y] |
shl ebx,16 |
shl ecx,16 |
add ebx,[line_x] |
add ecx,[line_y] |
add ebx,[line_size_x] |
add ecx,[line_size_y] |
call draw_line |
;line 4 |
mov edx,[color_line1] |
mov ebx,[line_x] |
mov ecx,[line_y] |
add ebx,[line_size_x] |
shl ebx,16 |
shl ecx,16 |
add ebx,[line_x] |
add ecx,[line_y] |
add ebx,[line_size_x] |
add ecx,[line_size_y] |
call draw_line |
ret |
;---------------------------------------------------------- |
columnus: |
sub eax,ecx |
jns @f |
jns no_columnus |
neg eax |
cmp eax,esi |
ja @f |
ja no_columnus |
sub ebx,edx |
jns @f |
jns no_columnus |
neg ebx |
cmp ebx,edi |
ja @f |
ja no_columnus |
mov eax,1 |
jmp columnus_true |
@@: |
no_columnus: |
xor eax,eax |
columnus_true: |
ret |
/programs/media/animage/trunk/icons.inc |
---|
125,7 → 125,7 |
mov [Icon_X],ci_panel_x_pos+131 |
mov ebx,[Icon_X] |
mov ecx,ci_panel_but_y2-1 |
mov ecx,ci_panel_but_y1-1 |
dec ebx |
dec ecx |
shl ebx,16 |