Subversion Repositories Kolibri OS

Rev

Rev 4155 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4155 Rev 5692
Line 185... Line 185...
185
	mov	cx,ax
185
	mov	cx,ax
186
@@:
186
@@:
187
	mov	fb_start_draw_cursor_line,cx
187
	mov	fb_start_draw_cursor_line,cx
188
	mov	ebx,fb_size_x
188
	mov	ebx,fb_size_x
189
	add	cx,fb_start_y
189
	add	cx,fb_start_y
190
;.1:
-
 
191
	shl	ecx,16
190
	shl	ecx,16
192
	mov	cx,fb_line_size_y
191
	mov	cx,fb_line_size_y
193
	mov	edx,fb_select_color
192
	mov	edx,fb_select_color
194
	xor	eax,eax
193
	xor	eax,eax
195
	mov	ax,fb_icon_size_x
194
	mov	ax,fb_icon_size_x
Line 207... Line 206...
207
	mcall	13,,,fb_background_color
206
	mcall	13,,,fb_background_color
208
.end:
207
.end:
209
	ret
208
	ret
210
;---------------------------------------------------------------------
209
;---------------------------------------------------------------------
211
fb_for_all_panel_selection:
210
fb_for_all_panel_selection:
212
;	dec	eax
-
 
213
	xor	edx,edx
211
	xor	edx,edx
214
	mov	dx,fb_line_size_y
212
	mov	dx,fb_line_size_y
215
	imul	eax,edx
213
	imul	eax,edx
216
	cmp	ax,cx
214
	cmp	ax,cx
217
	jae	@f
215
	jae	@f
Line 256... Line 254...
256
	xor	edx,edx
254
	xor	edx,edx
257
	mov	ebx,304
255
	mov	ebx,304
258
	div	ebx
256
	div	ebx
259
	cmp	eax,fb_folder_block
257
	cmp	eax,fb_folder_block
260
	je	.end_1
258
	je	.end_1
261
;.continue_1:
-
 
262
	popa
259
	popa
263
	cmp	eax,fb_max_panel_line
260
	cmp	eax,fb_max_panel_line
264
	je	.end_2
261
	je	.end_2
265
	mov	fb_marked_file,0
262
	mov	fb_marked_file,0
266
	cmp	[edx+299-40],byte 0
263
	cmp	[edx+299-40],byte 0
Line 300... Line 297...
300
	inc	fb_max_name_temp_size
297
	inc	fb_max_name_temp_size
301
@@:
298
@@:
302
	mov	ecx,fb_text_color
299
	mov	ecx,fb_text_color
303
	cmp	fb_marked_file,0
300
	cmp	fb_marked_file,0
304
	je	@f
301
	je	@f
305
	mov	ecx,fb_reduct_text_color	;0xff0000
302
	mov	ecx,fb_reduct_text_color
306
@@:
303
@@:
307
	mov	ax,fb_line_size_y
304
	mov	ax,fb_line_size_y
308
	sub	ax,fb_font_size_y
305
	sub	ax,fb_font_size_y
309
 
-
 
310
	push	ebx
306
	push	ebx
311
	mov	bx,ax
307
	mov	bx,ax
312
	shr	ax,1
308
	shr	ax,1
313
	test	bx,1b
309
	test	bx,1b
314
	jz	@f
310
	jz	@f
315
	inc	ax
311
	inc	ax
316
@@:
312
@@:
317
	pop	ebx
313
	pop	ebx
318
 
-
 
319
	push	ebx
314
	push	ebx
320
	add	bx,ax
315
	add	bx,ax
321
	call	.draw_name_temp_area
316
	call	.draw_name_temp_area
-
 
317
	cmp	fb_temp_counter,0
-
 
318
	jz	.continue
322
	xor	eax,eax
319
	xor	eax,eax
323
	mov	ax,fb_font_size_x
320
	mov	ax,fb_font_size_x
324
	imul	eax,fb_display_name_max_length
321
	imul	eax,fb_display_name_max_length
325
	shl	eax,16
322
	shl	eax,16
326
	push	edx
323
	push	edx
327
	add	ebx,eax
324
	add	ebx,eax
328
	mov	esi,2
325
	mov	esi,2
329
	mov	ecx,fb_reduct_text_color	;0xff0000
326
	mov	ecx,fb_reduct_text_color
330
	mov	edx,dword fb_truncated_filename_char
327
	mov	edx,dword fb_truncated_filename_char
331
	cmp	fb_temp_counter,0
-
 
332
	jne	@f
-
 
333
	mov	edx,dword fb_truncated_filename_clear
-
 
334
	mov	ecx,fb_text_color
-
 
335
@@:
-
 
336
	push	edi
-
 
337
 
-
 
338
	and	ecx,0x30ffffff
-
 
339
	add	ecx,0x40000000
-
 
340
	mov	eax,fb_background_color
-
 
341
	cmp	fb_draw_panel_selection_flag,1
-
 
342
	jne	@f
-
 
343
	mov	eax,fb_select_color
-
 
344
@@:
-
 
345
	mov	edi,eax
-
 
346
	mcall	4
328
	mcall	4
347
	pop	edi
-
 
348
	cmp	fb_temp_counter,0
-
 
349
	je	.continue_1
-
 
350
	push	edi
-
 
351
 
-
 
352
	mov	eax,fb_background_color
-
 
353
	cmp	fb_draw_panel_selection_flag,1
-
 
354
	jne	@f
-
 
355
	mov	eax,fb_select_color
-
 
356
@@:
-
 
357
	mov	edi,eax
-
 
358
 
-
 
359
	add	ebx,1 shl 16
-
 
360
	mcall	4
-
 
361
	pop	edi
-
 
362
.continue_1:
-
 
363
	pop	edx
329
	pop	edx
364
.continue:
330
.continue:
365
	pop	ebx
331
	pop	ebx
366
	add	bx,fb_line_size_y
332
	add	bx,fb_line_size_y
367
	add	edx,304
333
	add	edx,304
Line 369... Line 335...
369
	inc	eax
335
	inc	eax
370
	jmp	.start
336
	jmp	.start
371
;--------------------------------------
337
;--------------------------------------
372
.draw_name_temp_area:
338
.draw_name_temp_area:
373
	pusha
339
	pusha
374
	mov	ebx,esi
-
 
375
	mov	eax,dword '    '
340
	mov	eax,fb_max_name_temp_size
376
	mov	ecx,256/4
341
	add	eax,2
377
	cld
-
 
378
 
-
 
379
	push	edi
342
	sub	eax,esi
380
	mov	edi,fb_name_temp_area
-
 
381
	rep	stosd
-
 
382
	pop	edi
343
	mov	ecx,esi
383
 
-
 
384
	mov	esi,edx
344
	mov	esi,edx
385
	mov	ecx,ebx
-
 
386
	cld
-
 
387
	mov	edi,fb_name_temp_area
345
	mov	edi,fb_name_temp_area
-
 
346
	cld
-
 
347
	jcxz	@f
388
	rep	movsb
348
	rep	movsb
-
 
349
	cmp	byte [edi-1],0
-
 
350
	jnz	@f
-
 
351
	dec	edi
-
 
352
	inc	eax
-
 
353
@@:
-
 
354
	mov	ecx,eax
-
 
355
	shr	ecx,2
-
 
356
	mov	eax,dword '    '
-
 
357
	rep	stosd
389
	popa
358
	popa
390
 
-
 
391
	pusha
359
	pusha
392
	mov	edx,fb_name_temp_area
360
	mov	edx,fb_name_temp_area
393
 
-
 
394
	cmp	fb_all_redraw,2
361
	cmp	fb_all_redraw,2
395
	jne	.draw_name_temp_area_1
362
	jne	@f
396
	mov	esi,fb_max_name_temp_size
363
	mov	esi,fb_max_name_temp_size
397
	and	ecx,0xffffff
364
	add	esi,2
-
 
365
@@:
398
	add	ecx,0x40000000
366
	bts	ecx,30
399
 
-
 
400
	mov	eax,fb_background_color
367
	mov	eax,fb_background_color
401
	cmp	fb_draw_panel_selection_flag,1
368
	cmp	fb_draw_panel_selection_flag,1
402
	jne	@f
369
	jne	@f
403
	mov	eax,fb_select_color
370
	mov	eax,fb_select_color
404
@@:
371
@@:
405
	mov	edi,eax
372
	mov	edi,eax
406
.draw_name_temp_area_1:
-
 
407
	mcall	4
373
	mcall	4
408
	popa
374
	popa
409
 
-
 
410
	ret
375
	ret
411
;--------------------------------------
376
;--------------------------------------
412
.end_1:
377
.end_1:
413
	popa
378
	popa
414
.end_2:
379
.end_2:
415
	cmp	fb_all_redraw,1
380
	cmp	fb_all_redraw,1
416
	jne	@f
381
	jne	@f
417
 
-
 
418
	mov	ax,fb_start_y
382
	mov	ax,fb_start_y
419
	add	ax,fb_size_y
383
	add	ax,fb_size_y
420
	mov	cx,bx
384
	mov	cx,bx
421
	rol	ecx,16
385
	rol	ecx,16
422
	mov	cx,ax
386
	mov	cx,ax
Line 431... Line 395...
431
	sub	bx,3
395
	sub	bx,3
432
	rol	ebx,16
396
	rol	ebx,16
433
	mov	edx,fb_background_color	;0xffffff
397
	mov	edx,fb_background_color	;0xffffff
434
	mcall	13
398
	mcall	13
435
@@:
399
@@:
436
 
-
 
437
.end:
-
 
438
;	mov	fb_draw_scroll_bar,dword 1
-
 
439
	ret
400
	ret
440
;---------------------------------------------------------------------
401
;---------------------------------------------------------------------
441
fb_clear_line:
402
fb_clear_line:
442
	mov	fb_draw_panel_selection_flag,0
403
	mov	fb_draw_panel_selection_flag,0
443
	pusha
404
	pusha
444
	shl	ebx,16
405
	shl	ebx,16
445
	shr	ebx,16
406
	shr	ebx,16
446
;	dec	ebx
-
 
447
	cmp	fb_select_panel_counter,0
407
	cmp	fb_select_panel_counter,0
448
	je	.continue
408
	je	.continue
449
	mov	ax,fb_start_draw_cursor_line
409
	mov	ax,fb_start_draw_cursor_line
450
	add	ax,fb_start_y
410
	add	ax,fb_start_y
451
	cmp	bx,ax
411
	cmp	bx,ax
Line 457... Line 417...
457
	je	.end
417
	je	.end
458
	cmp	fb_all_redraw,0
418
	cmp	fb_all_redraw,0
459
	je	.end
419
	je	.end
460
	mov	ebx,[esp+16]
420
	mov	ebx,[esp+16]
461
	mov	cx,bx
421
	mov	cx,bx
462
;	dec	cx
-
 
463
	rol	ecx,16
422
	rol	ecx,16
464
	mov	cx,fb_line_size_y
423
	mov	cx,fb_line_size_y
465
	mov	bx,fb_size_x
424
	mov	bx,fb_size_x
466
	ror	ebx,16
425
	ror	ebx,16
467
	sub	bx,fb_icon_size_x
426
	sub	bx,fb_icon_size_x
Line 497... Line 456...
497
	mov	fb_file_name_length,esi
456
	mov	fb_file_name_length,esi
498
	sub	fb_file_name_length,edx
457
	sub	fb_file_name_length,edx
499
	mov	fb_temp_counter,esi
458
	mov	fb_temp_counter,esi
500
	test	[edx-40],byte	0x10
459
	test	[edx-40],byte	0x10
501
	jnz	.size
460
	jnz	.size
502
;@@:
-
 
503
	dec	esi
461
	dec	esi
504
	dec	edx
462
	dec	edx
505
@@:
463
@@:
506
	std
464
	std
507
	lodsb
465
	lodsb
Line 581... Line 539...
581
	jz	@f
539
	jz	@f
582
	mov	dl,byte 'K'
540
	mov	dl,byte 'K'
583
	jmp	.call_decimal_string
541
	jmp	.call_decimal_string
584
@@:
542
@@:
585
	mov	eax,ebx
543
	mov	eax,ebx
586
;.size_convert:
-
 
587
	mov	ebx,fb_type_table
544
	mov	ebx,fb_type_table
588
	add	ebx,6
545
	add	ebx,6
589
	call	fb_decimal_string_4
546
	call	fb_decimal_string_4
590
.size_convert_end:
547
.size_convert_end:
591
	mov	eax,fb_type_table
548
	mov	eax,fb_type_table
Line 636... Line 593...
636
	sub	ebx,122+12+15
593
	sub	ebx,122+12+15
637
	rol	ebx,16
594
	rol	ebx,16
638
	mov	ecx,fb_text_color
595
	mov	ecx,fb_text_color
639
	cmp	fb_marked_file,0
596
	cmp	fb_marked_file,0
640
	je	@f
597
	je	@f
641
	mov	ecx,fb_reduct_text_color	;0xff0000
598
	mov	ecx,fb_reduct_text_color
642
@@:
599
@@:
643
	mov	edx,fb_type_table
600
	mov	edx,fb_type_table
644
	mov	esi,20
601
	mov	esi,20
645
 
-
 
646
	mov	ax,fb_line_size_y
602
	mov	ax,fb_line_size_y
647
	sub	ax,fb_font_size_y
603
	sub	ax,fb_font_size_y
648
 
-
 
649
	push	ebx
604
	push	ebx
650
	mov	bx,ax
605
	mov	bx,ax
651
	shr	ax,1
606
	shr	ax,1
652
	test	bx,1b
607
	test	bx,1b
653
	jz	@f
608
	jz	@f
654
	inc	ax
609
	inc	ax
655
@@:
610
@@:
656
	pop	ebx
611
	pop	ebx
657
	add	bx,ax
612
	add	bx,ax
658
	cmp	fb_all_redraw,2
-
 
659
	jne	.draw  ;@f
-
 
660
	and	ecx,0xffffff
613
	bts	ecx,30
661
	add	ecx,0x40000000
-
 
662
 
-
 
663
	mov	eax,fb_background_color
614
	mov	eax,fb_background_color
664
	cmp	fb_draw_panel_selection_flag,1
615
	cmp	fb_draw_panel_selection_flag,1
665
	jne	@f
616
	jne	@f
666
	mov	eax,fb_select_color
617
	mov	eax,fb_select_color
667
@@:
618
@@:
668
	mov	edi,eax
619
	mov	edi,eax
669
.draw:
-
 
670
	mcall	4
620
	mcall	4
671
	popa
621
	popa
672
	ret
622
	ret
673
;---------------------------------------------------------------------
623
;---------------------------------------------------------------------
674
fb_draw_icon:
624
fb_draw_icon:
Line 685... Line 635...
685
	jz	@f
635
	jz	@f
686
	inc	eax
636
	inc	eax
687
@@:
637
@@:
688
	test	[edx-40],byte 0x10
638
	test	[edx-40],byte 0x10
689
	jnz	.draw_dir_pic
639
	jnz	.draw_dir_pic
690
 
-
 
691
	call	fb_get_icon_number
640
	call	fb_get_icon_number
692
;	mov	ebx,2
-
 
693
	imul	ebx,eax	;16*16*3
641
	imul	ebx,eax	;16*16*3
694
	jmp	.draw
642
	jmp	.draw
695
.draw_dir_pic:
643
.draw_dir_pic:
696
	xor	ebx,ebx
644
	xor	ebx,ebx
697
	cmp	[edx],word '..'
645
	cmp	[edx],word '..'
Line 700... Line 648...
700
.draw:
648
.draw:
701
	add	ebx,fb_icon_raw_area
649
	add	ebx,fb_icon_raw_area
702
	mov	cx,fb_icon_size_x
650
	mov	cx,fb_icon_size_x
703
	shl	ecx,16
651
	shl	ecx,16
704
	mov	cx,fb_icon_size_y
652
	mov	cx,fb_icon_size_y
705
	
-
 
706
	mov	edx,[esp+16]
653
	mov	edx,[esp+16]
707
	ror	edx,16
654
	ror	edx,16
708
	sub	edx,2
655
	sub	edx,2
709
	sub	dx,fb_icon_size_x
656
	sub	dx,fb_icon_size_x
710
	rol	edx,16
657
	rol	edx,16
711
 
-
 
712
	mov	ax,fb_line_size_y
658
	mov	ax,fb_line_size_y
713
	sub	ax,fb_icon_size_y
659
	sub	ax,fb_icon_size_y
714
	shr	ax,1
660
	shr	ax,1
715
	add	dx,ax
661
	add	dx,ax
716
 
-
 
717
	mov	esi,fb_resolution_raw
662
	mov	esi,fb_resolution_raw
718
 
-
 
719
	xor	ebp,ebp
663
	xor	ebp,ebp
720
	
-
 
721
	push	edi
664
	push	edi
722
	mov	edi,fb_palette_raw
665
	mov	edi,fb_palette_raw
723
	mcall	65
666
	mcall	65
724
	pop	edi
667
	pop	edi
725
	popa
668
	popa
Line 924... Line 867...
924
	add	al, 0x20
867
	add	al, 0x20
925
	ret
868
	ret
926
;---------------------------------------------------------------------
869
;---------------------------------------------------------------------
927
fb_truncated_filename_char:
870
fb_truncated_filename_char:
928
	db	'..'
871
	db	'..'
929
fb_truncated_filename_clear:
-
 
930
	db	'  '
-
 
931
;---------------------------------------------------------------------
872
;---------------------------------------------------------------------
932
;*****************************************************************************
873
;*****************************************************************************
933
;*****************************************************************************
874
;*****************************************************************************
934
; mouse event
875
; mouse event
935
;*****************************************************************************
876
;*****************************************************************************