kiv and libimg.asm: Follow asm style guide, no semantic changes.

git-svn-id: svn://kolibrios.org@8497 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Ivan Baravy 2020-12-30 05:32:02 +00:00
parent de8931dae4
commit a16331c816
2 changed files with 2504 additions and 2461 deletions

File diff suppressed because it is too large Load Diff

View File

@ -37,7 +37,8 @@ START:
mcall SF_SYSTEM, SSF_MOUSE_SETTINGS, SSSF_SET_SPEEDUP, 5 mcall SF_SYSTEM, SSF_MOUSE_SETTINGS, SSSF_SET_SPEEDUP, 5
mcall SF_SYS_MISC, SSF_HEAP_INIT mcall SF_SYS_MISC, SSF_HEAP_INIT
mcall SF_KEYBOARD, SSF_SET_INPUT_MODE, 1 ; set kbd mode to scancodes mcall SF_KEYBOARD, SSF_SET_INPUT_MODE, 1 ; set kbd mode to scancodes
mcall SF_SET_EVENTS_MASK, EVM_REDRAW or EVM_KEY or EVM_BUTTON or EVM_MOUSE or EVM_MOUSE_FILTER mcall SF_SET_EVENTS_MASK, EVM_REDRAW or EVM_KEY or EVM_BUTTON or \
EVM_MOUSE or EVM_MOUSE_FILTER
stdcall dll.Load, @IMPORT stdcall dll.Load, @IMPORT
or eax, eax or eax, eax
@ -57,7 +58,7 @@ START:
mov esi, __params mov esi, __params
mov edi, path mov edi, path
mov ecx, 4096/4 mov ecx, 4096/4
rep movsd rep movsd
mov byte[edi-1], 0 mov byte[edi-1], 0
@@: @@:
; OpenDialog initialisation ; OpenDialog initialisation
@ -100,7 +101,7 @@ START:
mov esi, path mov esi, path
mov edi, __params mov edi, __params
mov ecx, 4096/4 mov ecx, 4096/4
rep movsd rep movsd
mov byte[edi-1], 0 mov byte[edi-1], 0
jmp params_given jmp params_given
@ -470,7 +471,7 @@ button:
invoke img.rotate, [cur_image] invoke img.rotate, [cur_image]
@@: @@:
invoke img.rotate, [orig_image] invoke img.rotate, [orig_image]
mov [bNewImage], 1 mov [bNewImage], 1
jmp redraw_all jmp redraw_all
; rotate right ; rotate right
@ -497,7 +498,7 @@ button:
mov edi, __params mov edi, __params
push edi push edi
mov ecx, 4096/4 mov ecx, 4096/4
rep movsd rep movsd
mov byte[edi-1], 0 mov byte[edi-1], 0
pop esi pop esi
@ -831,7 +832,7 @@ load_directory:
sub ecx, esi sub ecx, esi
dec ecx dec ecx
js @f js @f
rep movsb rep movsb
@@: @@:
mov byte[edi], 0 mov byte[edi], 0
mcall 68, 12, 0x1000 mcall 68, 12, 0x1000
@ -935,7 +936,7 @@ load_directory:
.copy: .copy:
mov esi, [esp] mov esi, [esp]
mov ecx, 304 / 4 mov ecx, 304 / 4
rep movsd rep movsd
inc dword[esp+4] inc dword[esp+4]
.nocopy: .nocopy:
.noext: .noext:
@ -1059,36 +1060,36 @@ proc draw_window
jz @f jz @f
call generate_window_header call generate_window_header
@@: @@:
cmp [window.width], 0 cmp [window.width], 0
jne @f jne @f
mcall SF_GET_SCREEN_SIZE mcall SF_GET_SCREEN_SIZE
mov ebx,eax ; mov ebx, eax
shr ebx,16 ; ebx = width shr ebx, 16 ; ebx = width
movzx esi,ax ; esi = height movzx esi, ax ; esi = height
mov eax, ebx mov eax, ebx
xor edx, edx xor edx, edx
mov ebx, 3 mov ebx, 3
div ebx div ebx
imul eax, 2 imul eax, 2
mov [window.width], eax mov [window.width], eax
xor edx, edx xor edx, edx
mov ebx, 4 mov ebx, 4
div ebx div ebx
mov [window.left], eax mov [window.left], eax
mov eax, esi mov eax, esi
xor edx, edx xor edx, edx
mov ebx, 3 mov ebx, 3
div ebx div ebx
imul eax, 2 imul eax, 2
mov [window.height], eax mov [window.height], eax
xor edx, edx xor edx, edx
mov ebx, 4 mov ebx, 4
div ebx div ebx
mov [window.top], eax mov [window.top], eax
@@: @@:
mcall SF_REDRAW, SSF_BEGIN_DRAW mcall SF_REDRAW, SSF_BEGIN_DRAW
@ -1968,7 +1969,7 @@ proc merge_icons_to_single_img _img
mov edi, [ebx+Image.Data] mov edi, [ebx+Image.Data]
mov ecx, [ebx+Image.Width] mov ecx, [ebx+Image.Width]
imul ecx, [ebx+Image.Height] imul ecx, [ebx+Image.Height]
rep stosd rep stosd
mov eax, [_img] mov eax, [_img]
cmp [eax+Image.Type], Image.bpp32 cmp [eax+Image.Type], Image.bpp32
@ -2022,7 +2023,7 @@ endl
add edi, eax add edi, eax
.next_line: .next_line:
mov ecx, [edx+Image.Width] mov ecx, [edx+Image.Width]
rep movsd rep movsd
mov eax, [ebx+Image.Width] mov eax, [ebx+Image.Width]
sub eax, [edx+Image.Width] sub eax, [edx+Image.Width]
shl eax, 2 shl eax, 2
@ -2093,7 +2094,7 @@ proc recalc_client
stdcall copy_box, work, work_prev stdcall copy_box, work, work_prev
xor ecx, ecx xor ecx, ecx
test [bShowToolbar], 1 test [bShowToolbar], 1
jz @f jz @f
mov ecx, [toolbar.height] mov ecx, [toolbar.height]
@@: @@:
@ -2527,7 +2528,7 @@ db 'XBM',0
db 0 db 0
draw_window_fake: draw_window_fake:
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
scale_mode_calc dd scale_none_calc, 0, 0, 0, scale_fit_min_calc scale_mode_calc dd scale_none_calc, 0, 0, 0, scale_fit_min_calc