forked from KolibriOS/kolibrios
zSea - 2 small bugfix.
git-svn-id: svn://kolibrios.org@2116 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a722eb5c4d
commit
13cc6f9336
@ -218,14 +218,20 @@ convert:
|
|||||||
jae @f
|
jae @f
|
||||||
mov eax,770
|
mov eax,770
|
||||||
@@:
|
@@:
|
||||||
add ebx,54
|
mov [wnd_width],eax
|
||||||
|
push ebx
|
||||||
|
mcall 48,4
|
||||||
|
pop ebx
|
||||||
|
add ebx,eax
|
||||||
|
mov [skin_height],eax
|
||||||
|
add ebx,28+4 ;54
|
||||||
cmp ebx,150
|
cmp ebx,150
|
||||||
jae @f
|
jae @f
|
||||||
mov ebx,150
|
mov ebx,150
|
||||||
@@:
|
@@:
|
||||||
mov [wnd_width],eax
|
|
||||||
mov [wnd_height],ebx
|
mov [wnd_height],ebx
|
||||||
|
|
||||||
|
|
||||||
mcall 14
|
mcall 14
|
||||||
|
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
|
@ -38,7 +38,7 @@ lsz fitext,\
|
|||||||
db 0
|
db 0
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
Authors_text:
|
Authors_text:
|
||||||
.1: db 'zSea version: 1.00 RC3 Date: 07/07/2011',0
|
.1: db 'zSea version: 1.00 RC3 Date: 24/08/2011',0
|
||||||
.2: db 'Authors:',0
|
.2: db 'Authors:',0
|
||||||
.3: db 'Marat Zakiyanov aka Mario(Mario79)',0
|
.3: db 'Marat Zakiyanov aka Mario(Mario79)',0
|
||||||
.4: db 'zSea program, modules: cnv_bmp.obj,',0
|
.4: db 'zSea program, modules: cnv_bmp.obj,',0
|
||||||
@ -232,6 +232,8 @@ img_palette dd 0
|
|||||||
|
|
||||||
background_color dd 0xffffff
|
background_color dd 0xffffff
|
||||||
|
|
||||||
|
skin_height dd 0
|
||||||
|
|
||||||
RAW1_pointer dd 0
|
RAW1_pointer dd 0
|
||||||
RAW1_size_x dd 0
|
RAW1_size_x dd 0
|
||||||
RAW1_size dd 0
|
RAW1_size dd 0
|
||||||
|
@ -42,10 +42,10 @@
|
|||||||
jz .exit_error ;.exit
|
jz .exit_error ;.exit
|
||||||
shl eax,16
|
shl eax,16
|
||||||
add eax,[window_high]
|
add eax,[window_high]
|
||||||
cmp ax,50-22
|
; cmp ax,28
|
||||||
jbe @f
|
; jbe @f
|
||||||
sub ax,50-22
|
sub ax,28
|
||||||
@@:
|
;@@:
|
||||||
mov [wa_high],ax
|
mov [wa_high],ax
|
||||||
mov [wa_high_1],ax
|
mov [wa_high_1],ax
|
||||||
mov [wa_high_2],ax
|
mov [wa_high_2],ax
|
||||||
|
@ -1,46 +1,23 @@
|
|||||||
|
|
||||||
; *********************************************
|
; *********************************************
|
||||||
; ******* WINDOW DEFINITIONS AND DRAW ********
|
; ******* WINDOW DEFINITIONS AND DRAW ********
|
||||||
; *********************************************
|
; *********************************************
|
||||||
|
|
||||||
|
|
||||||
draw_window:
|
draw_window:
|
||||||
|
|
||||||
or [bWasDraw],1
|
or [bWasDraw],1
|
||||||
|
|
||||||
mcall 12,1
|
mcall 12,1
|
||||||
|
|
||||||
; DRAW WINDOW
|
|
||||||
xor eax,eax ; function 0 : define and draw window
|
xor eax,eax ; function 0 : define and draw window
|
||||||
; mov ebx,350 ; [x start] *65536 + [x size]
|
mov ebx,[wnd_width]
|
||||||
; mov ecx,400 ; [y start] *65536 + [y size]
|
mov ecx,[wnd_height]
|
||||||
mov ebx,0*65536+0
|
|
||||||
mov ecx,0*65536+0
|
|
||||||
add ebx,[wnd_width]
|
|
||||||
add ecx,[wnd_height]
|
|
||||||
cmp cx,55
|
|
||||||
ja @f
|
|
||||||
mov cx,55
|
|
||||||
@@:
|
|
||||||
mov edx,0x63ffffff ; color of work area RRGGBB,8->color gl
|
|
||||||
; pusha
|
|
||||||
xor esi,esi
|
xor esi,esi
|
||||||
mcall
|
mcall ,,,0x73ffffff,,Authors_text.1
|
||||||
; popa
|
|
||||||
; imul ecx,[load_file_number],304
|
|
||||||
; add ecx,32+40
|
|
||||||
; add ecx,[load_directory_pointer]
|
|
||||||
mov ecx,Authors_text.1 ; communication_area_name
|
|
||||||
; mov ecx,[communication_area]
|
|
||||||
; add ecx,4
|
|
||||||
; mov ecx,string
|
|
||||||
mcall 71,1, ;labelt ; plugin_pach ;file_name ;plugin_pach ;plugin_pach
|
|
||||||
|
|
||||||
call get_window_param
|
call get_window_param
|
||||||
|
mov eax,[procinfo+70] ;status of window
|
||||||
|
test eax,100b
|
||||||
|
jne .end
|
||||||
|
|
||||||
call draw_other
|
call draw_other
|
||||||
|
|
||||||
|
|
||||||
push dword menu_data_1
|
push dword menu_data_1
|
||||||
call [menu_bar_draw]
|
call [menu_bar_draw]
|
||||||
push dword menu_data_2
|
push dword menu_data_2
|
||||||
@ -54,13 +31,6 @@ draw_window:
|
|||||||
push dword menu_data_6
|
push dword menu_data_6
|
||||||
call [menu_bar_draw]
|
call [menu_bar_draw]
|
||||||
|
|
||||||
; draw_menu_bar menu_data_1
|
|
||||||
; draw_menu_bar menu_data_2
|
|
||||||
; draw_menu_bar menu_data_3
|
|
||||||
; draw_menu_bar menu_data_4
|
|
||||||
; draw_menu_bar menu_data_5
|
|
||||||
; draw_menu_bar menu_data_6
|
|
||||||
|
|
||||||
push dword dinamic_button_data_1
|
push dword dinamic_button_data_1
|
||||||
call [dinamic_button_draw]
|
call [dinamic_button_draw]
|
||||||
push dword dinamic_button_data_2
|
push dword dinamic_button_data_2
|
||||||
@ -92,22 +62,6 @@ draw_window:
|
|||||||
push dword dinamic_button_data_15
|
push dword dinamic_button_data_15
|
||||||
call [dinamic_button_draw]
|
call [dinamic_button_draw]
|
||||||
|
|
||||||
; draw_dinamic_button dinamic_button_data_1 ; open file
|
|
||||||
; draw_dinamic_button dinamic_button_data_2 ; reload file
|
|
||||||
; draw_dinamic_button dinamic_button_data_3 ; left limit
|
|
||||||
; draw_dinamic_button dinamic_button_data_4 ; left arrow
|
|
||||||
; draw_dinamic_button dinamic_button_data_5 ; slide show
|
|
||||||
; draw_dinamic_button dinamic_button_data_6 ; right arrow
|
|
||||||
; draw_dinamic_button dinamic_button_data_7 ; right limit
|
|
||||||
; draw_dinamic_button dinamic_button_data_8 ; zoom +
|
|
||||||
; draw_dinamic_button dinamic_button_data_9 ; zoom -
|
|
||||||
; draw_dinamic_button dinamic_button_data_10 ; zoom 100%
|
|
||||||
; draw_dinamic_button dinamic_button_data_11 ; rotate clockwise
|
|
||||||
; draw_dinamic_button dinamic_button_data_12 ; rotate counter-clockwise
|
|
||||||
; draw_dinamic_button dinamic_button_data_13 ; file information
|
|
||||||
; draw_dinamic_button dinamic_button_data_14 ; wallpaper
|
|
||||||
; draw_dinamic_button dinamic_button_data_15 ; settings
|
|
||||||
|
|
||||||
mcall 13,<225,2>,<3,22>,0
|
mcall 13,<225,2>,<3,22>,0
|
||||||
mcall ,<280,2>
|
mcall ,<280,2>
|
||||||
mcall ,<410,2>
|
mcall ,<410,2>
|
||||||
@ -115,23 +69,14 @@ draw_window:
|
|||||||
mcall ,<545,2>
|
mcall ,<545,2>
|
||||||
mcall ,<625,2>
|
mcall ,<625,2>
|
||||||
mcall ,<720,2>
|
mcall ,<720,2>
|
||||||
; WINDOW LABEL
|
mcall 4,<630,3>,0x80000000, file_mount
|
||||||
|
|
||||||
; mov esi, file_mount - file_mount_end
|
|
||||||
mcall 4,<630,3>,0x80000000, file_mount ;, file_mount - file_mount.end
|
|
||||||
; cmp [soi],0
|
|
||||||
; je @f
|
|
||||||
|
|
||||||
mcall 13,<677,40>,<13,11>,0xe5e5e5
|
mcall 13,<677,40>,<13,11>,0xe5e5e5
|
||||||
|
|
||||||
mov ecx,[load_directory_pointer]
|
mov ecx,[load_directory_pointer]
|
||||||
mov ecx,[ecx+4]
|
mov ecx,[ecx+4]
|
||||||
mcall 47,0x80060000, ,<679, 15>,0
|
mcall 47,0x80060000, ,<679, 15>,0
|
||||||
|
|
||||||
mcall 8,[dinamic_button_data_5.x],[dinamic_button_data_5.y],0x40000002
|
mcall 8,[dinamic_button_data_5.x],[dinamic_button_data_5.y],0x40000002
|
||||||
;@@:
|
.end:
|
||||||
mcall 12,2
|
mcall 12,2
|
||||||
|
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
set_draw_scrollbar_all:
|
set_draw_scrollbar_all:
|
||||||
@ -150,16 +95,12 @@ set_nodraw_scrollbar_all:
|
|||||||
draw_other:
|
draw_other:
|
||||||
call drawimage
|
call drawimage
|
||||||
@@:
|
@@:
|
||||||
mov ebx,0 ;5
|
xor ebx,ebx
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
add ebx,[window_width]
|
add ebx,[window_width]
|
||||||
; sub ebx,9
|
|
||||||
; push ebx
|
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
; mov ecx,[skin_high]
|
|
||||||
shl ecx,16
|
shl ecx,16
|
||||||
add ecx,50-22
|
add ecx,28
|
||||||
; sub ecx,[skin_high]
|
|
||||||
mov edx,0xffffff
|
mov edx,0xffffff
|
||||||
cmp [no_draw_window],0
|
cmp [no_draw_window],0
|
||||||
jne @f
|
jne @f
|
||||||
@ -169,59 +110,23 @@ draw_other:
|
|||||||
test eax,eax
|
test eax,eax
|
||||||
jnz @f
|
jnz @f
|
||||||
mov ecx,[window_high]
|
mov ecx,[window_high]
|
||||||
sub ecx,28 ;50+4
|
sub ecx,28
|
||||||
add ecx,(50-22) shl 16
|
add ecx,28 shl 16
|
||||||
mcall 13
|
mcall 13
|
||||||
@@:
|
@@:
|
||||||
|
|
||||||
call draw_number_of_file
|
call draw_number_of_file
|
||||||
|
|
||||||
call draw_zoom_factors
|
call draw_zoom_factors
|
||||||
|
|
||||||
cmp [scaling_mode],dword 0
|
cmp [scaling_mode],dword 0
|
||||||
jne @f
|
jne @f
|
||||||
; pop ebx
|
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
; mov ecx,[scroll_bar_data_vertical.cur_area]
|
|
||||||
; mov ebx,[scroll_bar_data_horizontal.cur_area]
|
|
||||||
; push ecx
|
|
||||||
; add ebx,5
|
|
||||||
; mov ax,bx
|
|
||||||
; shl ebx,16
|
|
||||||
; add ebx,[window_width]
|
|
||||||
; sub ebx,4
|
|
||||||
; sub bx,ax
|
|
||||||
; cmp bx,0
|
|
||||||
; jbe @f
|
|
||||||
; add ecx,50 shl 16
|
|
||||||
; mcall 13, , ,0xffffff
|
|
||||||
;
|
|
||||||
;@@:
|
|
||||||
; pop ecx
|
|
||||||
; pop ebx
|
|
||||||
|
|
||||||
; add ecx,50
|
|
||||||
; mov ax,cx
|
|
||||||
; shl ecx,16
|
|
||||||
; add ecx,[window_high]
|
|
||||||
; sub cx,ax
|
|
||||||
; sub ecx,4
|
|
||||||
; cmp cx,0
|
|
||||||
; jbe @f
|
|
||||||
; mcall 13, , ,0xffffff
|
|
||||||
|
|
||||||
;@@:
|
|
||||||
call set_draw_scrollbar_all
|
call set_draw_scrollbar_all
|
||||||
call draw_scrollbars
|
call draw_scrollbars
|
||||||
call set_nodraw_scrollbar_all
|
call set_nodraw_scrollbar_all
|
||||||
|
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
draw_number_of_file:
|
draw_number_of_file:
|
||||||
|
|
||||||
mcall 13,<630,42>,<13,11>,0xe5e5e5
|
mcall 13,<630,42>,<13,11>,0xe5e5e5
|
||||||
|
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
mov eax,[load_directory_pointer]
|
mov eax,[load_directory_pointer]
|
||||||
cmp [eax+4],dword 0
|
cmp [eax+4],dword 0
|
||||||
@ -234,15 +139,14 @@ draw_number_of_file:
|
|||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
draw_zoom_factors:
|
draw_zoom_factors:
|
||||||
mcall 13,<725,30>,<13,11>,0xe5e5e5
|
mcall 13,<725,30>,<13,11>,0xe5e5e5
|
||||||
|
|
||||||
mov ecx,[zoom_factors]
|
mov ecx,[zoom_factors]
|
||||||
mov ecx,[ecx]
|
mov ecx,[ecx]
|
||||||
mov [scaling_mode],ecx
|
mov [scaling_mode],ecx
|
||||||
test ecx,ecx
|
test ecx,ecx
|
||||||
jnz @f
|
jnz @f
|
||||||
mcall 4,<727,14>,0x80000000, zoom_auto_text
|
mcall 4,<727,14>,0x80000000,zoom_auto_text
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
mcall 47,0x80060000, ,<727, 15>,0
|
mcall 47,0x80060000,,<727, 15>,0
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
@ -25,7 +25,7 @@
|
|||||||
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
;*****************************************************************************
|
;*****************************************************************************
|
||||||
; v.1.0 rń3 07.07.2011
|
; v.1.0 rñ3 24.08.2011
|
||||||
;******************************************************************************
|
;******************************************************************************
|
||||||
use32
|
use32
|
||||||
org 0x0
|
org 0x0
|
||||||
@ -69,6 +69,9 @@ START: ; start of execution
|
|||||||
jne @r
|
jne @r
|
||||||
mov [active_process],ecx
|
mov [active_process],ecx
|
||||||
|
|
||||||
|
mcall 48,4
|
||||||
|
mov [skin_height],eax
|
||||||
|
|
||||||
mcall 68,12,1024
|
mcall 68,12,1024
|
||||||
mov [menu_data_1.procinfo],eax
|
mov [menu_data_1.procinfo],eax
|
||||||
mov [menu_data_2.procinfo],eax
|
mov [menu_data_2.procinfo],eax
|
||||||
@ -247,8 +250,18 @@ red_1:
|
|||||||
; mcall 15,3
|
; mcall 15,3
|
||||||
; jmp red_1
|
; jmp red_1
|
||||||
still:
|
still:
|
||||||
|
call pause_cicle
|
||||||
|
|
||||||
cmp [RAW1_flag],1
|
cmp [RAW1_flag],1
|
||||||
je animation_handler
|
je animation_handler
|
||||||
|
|
||||||
|
mcall 48,4
|
||||||
|
cmp [skin_height],eax
|
||||||
|
je @f
|
||||||
|
mov [skin_height],eax
|
||||||
|
call convert.img_resolution_ok
|
||||||
|
jmp red_1
|
||||||
|
@@:
|
||||||
mcall 10
|
mcall 10
|
||||||
.1:
|
.1:
|
||||||
cmp [open_file_flag],1
|
cmp [open_file_flag],1
|
||||||
@ -278,6 +291,7 @@ red_sort_directory:
|
|||||||
redraw_window:
|
redraw_window:
|
||||||
mov [redraw_flag],byte 0
|
mov [redraw_flag],byte 0
|
||||||
jmp red_1
|
jmp red_1
|
||||||
|
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
; red:
|
; red:
|
||||||
; test dword [status], 4
|
; test dword [status], 4
|
||||||
@ -303,6 +317,32 @@ button: ; button
|
|||||||
je slide_show.3 ;still
|
je slide_show.3 ;still
|
||||||
jmp slide_show
|
jmp slide_show
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
pause_cicle:
|
||||||
|
pusha
|
||||||
|
.start:
|
||||||
|
mcall 9,procinfo,-1
|
||||||
|
mov eax,[procinfo+70] ;status of window
|
||||||
|
test eax,100b
|
||||||
|
jne @f
|
||||||
|
popa
|
||||||
|
ret
|
||||||
|
@@:
|
||||||
|
mcall 10
|
||||||
|
dec eax
|
||||||
|
jz .redraw
|
||||||
|
dec eax
|
||||||
|
jz .key
|
||||||
|
dec eax
|
||||||
|
jnz .start
|
||||||
|
.button:
|
||||||
|
mcall -1
|
||||||
|
.key:
|
||||||
|
mcall 2
|
||||||
|
jmp .start
|
||||||
|
.redraw:
|
||||||
|
call draw_window
|
||||||
|
jmp .start
|
||||||
|
;---------------------------------------------------------------------
|
||||||
get_filter_data:
|
get_filter_data:
|
||||||
mov edi,Filter+4
|
mov edi,Filter+4
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
|
Loading…
Reference in New Issue
Block a user