kolibrios/programs/media/animage/trunk/design.inc
heavyiron 7c8ba5ff40 *fixed info for 4th function in documentation
*added animage and kfar
*renamed docpak (to docpack)
*chess fixed by Yellow to use 70th function
*docpack, tetris, jpegview, trantest, desktop uses system colors, new functions of window drawing now
*removed old rd2hd and rd2fd

git-svn-id: svn://kolibrios.org@180 a494cfbc-eb01-0410-851d-a64ba20cac60
2006-10-11 23:19:10 +00:00

333 lines
5.8 KiB
PHP

;-----------------------------------------------------
draw_volume_rectangle:
mov [line_x],eax
mov [line_y],ebx
mov [line_size_x],ecx
mov [line_size_y],edx
cmp esi,1
jne no_volume_light_rectangle
mov [color_rectangle],9350878
mov [color_line1],5669590
mov [color_line2],12508927
mov [color_line3],9350878
jmp exit_colors
no_volume_light_rectangle:
cmp esi,2
jne no_pressed_rectangle
mov [color_rectangle],9089258
mov [color_line1],5669590
mov [color_line2],9089258
mov [color_line3],9089258
jmp exit_colors
no_pressed_rectangle:
cmp esi,3
jne no_pressed_panel
mov [color_rectangle],9350878
mov [color_line1],5669590
mov [color_line2],7000
mov [color_line3],12508927
jmp exit_colors
no_pressed_panel:
cmp esi,4
jne no_pressed_light_panel
mov [color_rectangle],0xffffff
mov [color_line1],5669590
mov [color_line2],7000
mov [color_line3],12508927
jmp exit_colors
no_pressed_light_panel:
cmp esi,5
jne no_light_pressed_rectangle
mov [color_rectangle],9089258
mov [color_line1],5669590
mov [color_line2],9089258
mov [color_line3],9089258
jmp exit_colors
no_light_pressed_rectangle:
cmp esi,6
jne no_work_rectangle
mov [color_rectangle],9350878
mov [color_line1],5669590
mov [color_line2],9350878
mov [color_line3],9350878
jmp exit_colors
no_work_rectangle:
cmp esi,7
jne no_work_rectangle_2
mov [color_rectangle],9350878
mov [color_line1],9350878
mov [color_line2],9350878
mov [color_line3],9350878
jmp exit_colors
no_work_rectangle_2:
exit_colors:
;draw rectangle
mov ebx,[line_x]
mov ecx,[line_y]
shl ebx,16
shl ecx,16
add ebx,[line_size_x]
add ecx,[line_size_y]
mov edx,[color_rectangle]
call draw_rectangle
;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
;light line 1
mov edx,[color_line2]
mov ebx,[line_x]
mov ecx,[line_y]
inc ebx
inc ecx
shl ebx,16
shl ecx,16
add ebx,[line_x]
add ecx,[line_y]
add ebx,[line_size_x]
dec ebx
inc ecx
call draw_line
;light line 2
mov edx,[color_line2]
mov ebx,[line_x]
mov ecx,[line_y]
inc ebx
inc ecx
shl ebx,16
shl ecx,16
add ebx,[line_x]
add ecx,[line_y]
add ecx,[line_size_y]
dec ecx
inc ebx
call draw_line
;light line 3
mov edx,[color_line3]
mov ebx,[line_x]
mov ecx,[line_y]
add ebx,[line_size_x]
dec ebx
inc ecx
shl ebx,16
shl ecx,16
add ebx,[line_x]
add ecx,[line_y]
add ebx,[line_size_x]
add ecx,[line_size_y]
dec ebx
dec ecx
call draw_line
;light line 4
mov edx,[color_line3]
mov ebx,[line_x]
mov ecx,[line_y]
add ecx,[line_size_y]
inc ebx
dec ecx
shl ebx,16
shl ecx,16
add ebx,[line_x]
add ecx,[line_y]
add ecx,[line_size_y]
add ebx,[line_size_x]
dec ecx
dec ebx
call draw_line
ret
;----------------------------------------------------------
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 eax,13
mov ebx,[line_x]
mov ecx,[line_y]
shl ebx,16
shl ecx,16
add ebx,[line_size_x]
add ecx,[line_size_y]
int 0x40
ret
;----------------------------------------------------------
draw_conture:
mov [line_x],eax
mov [line_y],ebx
mov [line_size_x],ecx
mov [line_size_y],edx
mov [color_line1],5669590
;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 no_columnus
neg eax
cmp eax,esi
ja no_columnus
sub ebx,edx
jns no_columnus
neg ebx
cmp ebx,edi
ja no_columnus
mov eax,1
jmp columnus_true
no_columnus:
xor eax,eax
columnus_true:
ret
;----------------------------------------------------------
print_text:
mov [text_x],eax
mov [text_y],ebx
mov eax,4
mov ebx,[text_x]
shl ebx,16
add ebx,[text_y]
int 0x40
ret
;----------------------------------------------------------
draw_rectangle:
mov eax,13
int 0x40
ret
;------------------------
draw_line:
mov eax,38
int 0x40
ret
;----------------------------------------------------------
;lightlin 12508927
;lines 5669590
;workpan 9350878
;btnpress 9089258
line_x dd 0
line_y dd 0
line_size_x dd 0
line_size_y dd 0
color_line1 dd 0
color_line2 dd 0
color_line3 dd 0
color_rectangle dd 0
;--------------------
text_x dd 0
text_y dd 0
;--------------------