forked from KolibriOS/kolibrios
Box_Lib some optimization by size of code
git-svn-id: svn://kolibrios.org@1666 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
3256dedea8
commit
25d53f663a
@ -62,9 +62,9 @@ db_click equ [edi+52]
|
||||
dinamic_button_exit
|
||||
|
||||
.draw_1:
|
||||
cmp db_select,dword 1
|
||||
cmp dword db_select,1
|
||||
je .active_1
|
||||
cmp db_select,dword 2
|
||||
cmp dword db_select,2
|
||||
je .click_2
|
||||
mov ebx,db_passive_raw
|
||||
jmp .draw_2
|
||||
@ -137,7 +137,7 @@ dinamic_button_exit
|
||||
|
||||
test db_mouse_keys,dword 1b
|
||||
jnz @f
|
||||
cmp db_select,dword 1
|
||||
cmp dword db_select,1
|
||||
je .exit_menu_1
|
||||
mov db_select,dword 1
|
||||
call .draw_1
|
||||
@ -157,7 +157,7 @@ dinamic_button_exit
|
||||
jmp .exit_menu_2
|
||||
|
||||
.exit_menu:
|
||||
cmp db_select,dword 0
|
||||
cmp dword db_select,0
|
||||
je .exit_menu_1
|
||||
mov db_select,dword 0
|
||||
|
||||
|
@ -132,7 +132,7 @@ fb_draw_panel_1:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
fb_clear_panel:
|
||||
cmp fb_all_redraw,dword 1
|
||||
cmp fb_all_redraw,1
|
||||
jne @f
|
||||
xor eax,eax
|
||||
mov fb_max_name_temp_size,eax
|
||||
@ -160,7 +160,7 @@ fb_calc_max_panel_line:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
fb_draw_panel_selection:
|
||||
cmp fb_all_redraw,dword 2
|
||||
cmp fb_all_redraw,2
|
||||
je .end
|
||||
xor eax,eax
|
||||
cmp fb_select_panel_counter,eax
|
||||
@ -194,7 +194,7 @@ fb_draw_panel_selection:
|
||||
add ebx,eax
|
||||
mcall 13
|
||||
pop ebx
|
||||
cmp fb_all_redraw,dword 0
|
||||
cmp fb_all_redraw,0
|
||||
je .end
|
||||
mov bx,fb_start_x
|
||||
ror ebx,16
|
||||
@ -263,9 +263,9 @@ fb_draw_folder_data:
|
||||
@@:
|
||||
call fb_clear_line
|
||||
call fb_draw_type_size_date
|
||||
cmp fb_all_redraw,dword 2
|
||||
cmp fb_all_redraw,2
|
||||
je .draw_icon
|
||||
cmp fb_all_redraw,dword 0
|
||||
cmp fb_all_redraw,0
|
||||
je @f
|
||||
.draw_icon:
|
||||
call fb_draw_icon
|
||||
@ -385,7 +385,7 @@ fb_draw_folder_data:
|
||||
pusha
|
||||
mov edx,fb_name_temp_area
|
||||
|
||||
cmp fb_all_redraw,dword 2
|
||||
cmp fb_all_redraw,2
|
||||
jne .draw_name_temp_area_1
|
||||
mov esi,fb_max_name_temp_size
|
||||
and ecx,0xffffff
|
||||
@ -406,7 +406,7 @@ fb_draw_folder_data:
|
||||
.end_1:
|
||||
popa
|
||||
.end_2:
|
||||
cmp fb_all_redraw,dword 1
|
||||
cmp fb_all_redraw,1
|
||||
jne @f
|
||||
|
||||
mov ax,fb_start_y
|
||||
@ -447,9 +447,9 @@ fb_clear_line:
|
||||
mov fb_draw_panel_selection_flag,1
|
||||
jmp .end
|
||||
.continue:
|
||||
cmp fb_all_redraw,dword 2
|
||||
cmp fb_all_redraw,2
|
||||
je .end
|
||||
cmp fb_all_redraw,dword 0
|
||||
cmp fb_all_redraw,0
|
||||
je .end
|
||||
mov ebx,[esp+16]
|
||||
mov cx,bx
|
||||
@ -649,7 +649,7 @@ fb_draw_type_size_date:
|
||||
@@:
|
||||
pop ebx
|
||||
add bx,ax
|
||||
cmp fb_all_redraw,dword 2
|
||||
cmp fb_all_redraw,2
|
||||
jne .draw ;@f
|
||||
and ecx,0xffffff
|
||||
add ecx,0x40000000
|
||||
|
@ -87,7 +87,7 @@ m_get_mouse_flag equ [edi+116]
|
||||
|
||||
mov ebx,m_size_x
|
||||
mov ecx,m_size_y
|
||||
cmp m_select,dword 1
|
||||
cmp dword m_select,1
|
||||
je .active
|
||||
mov edx,m_bckg_col
|
||||
jmp @f
|
||||
@ -99,7 +99,7 @@ m_get_mouse_flag equ [edi+116]
|
||||
mov bx,cx
|
||||
movzx eax,word m_size_y
|
||||
call .calculate_font_offset
|
||||
cmp m_select,dword 1
|
||||
cmp dword m_select,1
|
||||
je .active_1
|
||||
mov ecx,m_bckg_text_col
|
||||
add ecx,0x80000000
|
||||
@ -237,16 +237,16 @@ m_get_mouse_flag equ [edi+116]
|
||||
cmp ax,cx
|
||||
ja .exit_menu
|
||||
|
||||
test m_mouse_keys,dword 1b
|
||||
test dword m_mouse_keys,1b
|
||||
jnz @f
|
||||
cmp m_select,dword 1
|
||||
cmp dword m_select,1
|
||||
je .exit_menu_1
|
||||
mov m_select,dword 1
|
||||
mov dword m_select,1
|
||||
call .draw_1
|
||||
jmp .exit_menu_1
|
||||
@@:
|
||||
|
||||
cmp m_get_mouse_flag,dword 1
|
||||
cmp dword m_get_mouse_flag,1
|
||||
mov m_get_mouse_flag,dword 0
|
||||
je @f
|
||||
|
||||
@ -278,7 +278,7 @@ m_get_mouse_flag equ [edi+116]
|
||||
.key_menu:
|
||||
mcall 2
|
||||
|
||||
cmp m_extended_key,dword 1
|
||||
cmp dword m_extended_key,1
|
||||
je .extended_key
|
||||
test al,al
|
||||
jnz .key_menu_end
|
||||
@ -376,7 +376,7 @@ m_get_mouse_flag equ [edi+116]
|
||||
cmp ah,73 ;PageUp
|
||||
jne .menu_key_79
|
||||
@@:
|
||||
cmp m_cursor,dword 0
|
||||
cmp dword m_cursor,0
|
||||
je .still
|
||||
mov ebx,m_cursor
|
||||
mov m_cursor_old,ebx
|
||||
@ -448,7 +448,7 @@ m_get_mouse_flag equ [edi+116]
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
.free_menu_area:
|
||||
cmp m_buf_adress,dword 0
|
||||
cmp dword m_buf_adress,0
|
||||
je @f
|
||||
mcall 68,13,m_buf_adress
|
||||
xor eax,eax
|
||||
@ -540,7 +540,7 @@ m_get_mouse_flag equ [edi+116]
|
||||
jmp .exit_menu_3
|
||||
|
||||
.exit_menu:
|
||||
cmp m_select,dword 0
|
||||
cmp dword m_select,0
|
||||
je .exit_menu_1
|
||||
mov m_select,dword 0
|
||||
|
||||
|
@ -326,7 +326,7 @@ scroll_bar_exit
|
||||
.no_size:
|
||||
mov sb_run_size,eax
|
||||
;*********************************
|
||||
cmp sb_delta,word 1
|
||||
cmp word sb_delta,1
|
||||
je .@@_3
|
||||
mov eax,sb_work_size
|
||||
sub eax,sb_run_size
|
||||
@ -358,7 +358,7 @@ scroll_bar_exit
|
||||
mov ecx,sb_size_y
|
||||
mov edx,sb_line_col
|
||||
mov eax,13
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; left extreme line
|
||||
@@:
|
||||
@ -366,7 +366,7 @@ scroll_bar_exit
|
||||
ror ebx,16
|
||||
add bx,sb_size_x
|
||||
rol ebx,16
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; right extreme line
|
||||
@@:
|
||||
@ -378,7 +378,7 @@ scroll_bar_exit
|
||||
mov bx,sb_size_x
|
||||
dec ebx
|
||||
mov cx,1
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; top button - extreme line
|
||||
@@:
|
||||
@ -387,7 +387,7 @@ scroll_bar_exit
|
||||
add ecx,sb_btn_high
|
||||
sub ecx,2
|
||||
mov edx,sb_frnt_col
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; top button filling
|
||||
;*********************************
|
||||
@ -400,7 +400,7 @@ draw_up_arrow_vertical
|
||||
add ecx,sb_btn_high ;14 shl 16
|
||||
rol ecx,16
|
||||
mov edx,sb_line_col
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; top button - bottom line
|
||||
@@:
|
||||
@ -474,7 +474,7 @@ draw_runner_center_vertical
|
||||
inc ecx
|
||||
mov edx,sb_line_col
|
||||
mov eax,13
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; bottom button - top line
|
||||
@@:
|
||||
@ -483,7 +483,7 @@ draw_runner_center_vertical
|
||||
add cx,sb_btn_high
|
||||
sub ecx,2
|
||||
mov edx,sb_frnt_col
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; bottom button filling
|
||||
;*********************************
|
||||
@ -498,7 +498,7 @@ draw_down_arrow_vertical
|
||||
|
||||
mov edx,sb_line_col
|
||||
mov cx,1
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; bottom button - extreme line
|
||||
@@:
|
||||
@ -514,7 +514,7 @@ draw_down_arrow_vertical
|
||||
mov edi,dword [esp+36]
|
||||
mcall 37,1
|
||||
mov sb_m_pos,eax
|
||||
cmp sb_m_pos_2,dword 0
|
||||
cmp dword sb_m_pos_2,0
|
||||
jne @f
|
||||
|
||||
mov sb_m_pos_2,eax
|
||||
@ -534,7 +534,7 @@ draw_down_arrow_vertical
|
||||
jmp .continue_2
|
||||
|
||||
@@:
|
||||
cmp sb_m_keys,dword 0
|
||||
cmp dword sb_m_keys,0
|
||||
jne @f
|
||||
mov eax,sb_m_pos
|
||||
mov sb_m_pos_2,eax
|
||||
@ -559,7 +559,7 @@ draw_down_arrow_vertical
|
||||
cmp ax,cx
|
||||
jb .exit_sb
|
||||
|
||||
cmp sb_delta2,word 0
|
||||
cmp word sb_delta2,0
|
||||
je @f
|
||||
push ecx
|
||||
add cx,sb_btn_high
|
||||
@ -572,17 +572,17 @@ draw_down_arrow_vertical
|
||||
cmp ax,cx
|
||||
ja .exit_sb
|
||||
|
||||
cmp sb_delta2,word 0
|
||||
cmp word sb_delta2,0
|
||||
je @f
|
||||
sub cx,sb_btn_high
|
||||
cmp ax,cx
|
||||
ja .exit_sb
|
||||
|
||||
@@:
|
||||
cmp sb_delta2,word 1
|
||||
cmp word sb_delta2,1
|
||||
je @f
|
||||
|
||||
cmp sb_m_keys,dword 0
|
||||
cmp dword sb_m_keys,0
|
||||
je .exit_sb
|
||||
|
||||
mov cx,sb_start_x
|
||||
@ -663,13 +663,13 @@ draw_down_arrow_vertical
|
||||
xor ecx,ecx
|
||||
mov cx,sb_start_y
|
||||
add cx,sb_btn_high ;15
|
||||
cmp sb_delta,word 1
|
||||
cmp word sb_delta,1
|
||||
je .scroll_sb
|
||||
|
||||
cmp ax,cx
|
||||
ja .scroll_sb
|
||||
|
||||
cmp sb_m_keys,dword 0
|
||||
cmp dword sb_m_keys,0
|
||||
je .exit_sb
|
||||
|
||||
mov eax,sb_ar_offset
|
||||
@ -688,7 +688,7 @@ draw_down_arrow_vertical
|
||||
add cx,sb_size_y
|
||||
sub cx,sb_btn_high
|
||||
sub cx,sb_btn_high
|
||||
cmp sb_delta,word 1
|
||||
cmp word sb_delta,1
|
||||
je @f
|
||||
|
||||
cmp ax,cx
|
||||
@ -703,7 +703,7 @@ draw_down_arrow_vertical
|
||||
.scroll_sb_1:
|
||||
mov ebx,sb_run_size
|
||||
;*****************************************************************************
|
||||
cmp sb_delta,word 1
|
||||
cmp word sb_delta,1
|
||||
je .continue
|
||||
|
||||
@@:
|
||||
@ -780,7 +780,7 @@ draw_down_arrow_vertical
|
||||
jmp .exit_sb
|
||||
;*****************************************************************************
|
||||
.down_sb:
|
||||
cmp sb_m_keys,dword 0
|
||||
cmp dword sb_m_keys,0
|
||||
je .exit_sb
|
||||
|
||||
mov eax,sb_max_area
|
||||
@ -850,7 +850,7 @@ scroll_bar_exit
|
||||
.no_size:
|
||||
mov sb_run_size,eax
|
||||
;*********************************
|
||||
cmp sb_delta,word 1
|
||||
cmp word sb_delta,1
|
||||
je .@@_3
|
||||
mov eax,sb_work_size
|
||||
sub eax,sb_run_size
|
||||
@ -882,7 +882,7 @@ scroll_bar_exit
|
||||
inc ecx
|
||||
mov edx,sb_line_col
|
||||
mov eax,13
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; top extreme line
|
||||
@@:
|
||||
@ -890,7 +890,7 @@ scroll_bar_exit
|
||||
ror ecx,16
|
||||
add cx,sb_size_y
|
||||
rol ecx,16
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; bottom extreme line
|
||||
@@:
|
||||
@ -902,7 +902,7 @@ scroll_bar_exit
|
||||
mov cx,sb_size_y
|
||||
dec ecx
|
||||
mov bx,1
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; left button - extreme line
|
||||
@@:
|
||||
@ -911,7 +911,7 @@ scroll_bar_exit
|
||||
add ebx,sb_btn_high
|
||||
sub ebx,2
|
||||
mov edx,sb_frnt_col
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; left button filling
|
||||
;*********************************
|
||||
@ -924,7 +924,7 @@ draw_up_arrow_horizontal
|
||||
add ebx,sb_btn_high ;14 shl 16
|
||||
rol ebx,16
|
||||
mov edx,sb_line_col
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; left button - right line
|
||||
@@:
|
||||
@ -998,7 +998,7 @@ draw_runner_center_horizontal
|
||||
inc ebx
|
||||
mov edx,sb_line_col
|
||||
mov eax,13
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; bottom button - top line
|
||||
@@:
|
||||
@ -1007,7 +1007,7 @@ draw_runner_center_horizontal
|
||||
add bx,sb_btn_high
|
||||
sub ebx,2
|
||||
mov edx,sb_frnt_col
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; bottom button filling
|
||||
;*********************************
|
||||
@ -1022,7 +1022,7 @@ draw_down_arrow_horizontal
|
||||
|
||||
mov edx,sb_line_col
|
||||
mov bx,1
|
||||
cmp sb_all_redraw,dword 0
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; bottom button - extreme line
|
||||
@@:
|
||||
@ -1036,7 +1036,7 @@ draw_down_arrow_horizontal
|
||||
mov edi,dword [esp+36]
|
||||
mcall 37,1
|
||||
mov sb_m_pos,eax
|
||||
cmp sb_m_pos_2,dword 0
|
||||
cmp dword sb_m_pos_2,0
|
||||
jne @f
|
||||
|
||||
mov sb_m_pos_2,eax
|
||||
@ -1056,7 +1056,7 @@ draw_down_arrow_horizontal
|
||||
jmp .continue_2
|
||||
|
||||
@@:
|
||||
cmp sb_m_keys,dword 0
|
||||
cmp dword sb_m_keys,0
|
||||
jne @f
|
||||
mov eax,sb_m_pos
|
||||
mov sb_m_pos_2,eax
|
||||
@ -1081,7 +1081,7 @@ draw_down_arrow_horizontal
|
||||
cmp ax,cx
|
||||
jb .exit_sb
|
||||
|
||||
cmp sb_delta2,word 0
|
||||
cmp word sb_delta2,0
|
||||
je @f
|
||||
push ecx
|
||||
add cx,sb_btn_high
|
||||
@ -1094,17 +1094,17 @@ draw_down_arrow_horizontal
|
||||
cmp ax,cx
|
||||
ja .exit_sb
|
||||
|
||||
cmp sb_delta2,word 0
|
||||
cmp word sb_delta2,0
|
||||
je @f
|
||||
sub cx,sb_btn_high
|
||||
cmp ax,cx
|
||||
ja .exit_sb
|
||||
|
||||
@@:
|
||||
cmp sb_delta2,word 1
|
||||
cmp word sb_delta2,1
|
||||
je @f
|
||||
|
||||
cmp sb_m_keys,dword 0
|
||||
cmp dword sb_m_keys,0
|
||||
je .exit_sb
|
||||
|
||||
mov cx,sb_start_y ;x
|
||||
@ -1188,13 +1188,13 @@ draw_down_arrow_horizontal
|
||||
xor ecx,ecx
|
||||
mov cx,sb_start_x ;y
|
||||
add cx,sb_btn_high ;15
|
||||
cmp sb_delta,word 1
|
||||
cmp word sb_delta,1
|
||||
je .scroll_sb
|
||||
|
||||
cmp ax,cx
|
||||
ja .scroll_sb
|
||||
|
||||
cmp sb_m_keys,dword 0
|
||||
cmp dword sb_m_keys,0
|
||||
je .exit_sb
|
||||
|
||||
mov eax,sb_ar_offset
|
||||
@ -1213,7 +1213,7 @@ draw_down_arrow_horizontal
|
||||
add cx,sb_size_x ;y
|
||||
sub cx,sb_btn_high
|
||||
sub cx,sb_btn_high
|
||||
cmp sb_delta,word 1
|
||||
cmp word sb_delta,1
|
||||
je @f
|
||||
|
||||
cmp ax,cx
|
||||
@ -1228,7 +1228,7 @@ draw_down_arrow_horizontal
|
||||
.scroll_sb_1:
|
||||
mov ebx,sb_run_size
|
||||
;*****************************************************************************
|
||||
cmp sb_delta,word 1
|
||||
cmp word sb_delta,1
|
||||
je .continue
|
||||
|
||||
@@:
|
||||
@ -1306,7 +1306,7 @@ draw_down_arrow_horizontal
|
||||
jmp .exit_sb
|
||||
;*****************************************************************************
|
||||
.down_sb:
|
||||
cmp sb_m_keys,dword 0
|
||||
cmp dword sb_m_keys,0
|
||||
je .exit_sb
|
||||
|
||||
mov eax,sb_max_area
|
||||
|
Loading…
Reference in New Issue
Block a user