Subversion Repositories Kolibri OS

Rev

Rev 259 | Rev 280 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 259 Rev 267
Line 46... Line 46...
46
 
46
 
Line 47... Line 47...
47
	call	align_editor_in_tab
47
	call	align_editor_in_tab
Line 48... Line 48...
48
 
48
 
49
	mov	[top_ofs],ATOPH;+1
49
	mov	[top_ofs],ATOPH;+1
50
 
50
 
51
	mov	eax,[cur_tab.Editor.Bounds.Right]
51
	mov	eax,[cur_editor.Bounds.Right]
52
	sub	eax,[cur_tab.Editor.Bounds.Left]
52
	sub	eax,[cur_editor.Bounds.Left]
53
	sub	eax,[cur_tab.Editor.Gutter.Width]
53
	sub	eax,[cur_editor.Gutter.Width]
54
	sub	eax,SCRLW+LCHGW+4
54
	sub	eax,SCRLW+LCHGW+4
55
	cdq
55
	cdq
Line 56... Line 56...
56
	mov	ebx,6
56
	mov	ebx,6
57
	div	ebx
57
	div	ebx
58
	mov	[columns.scr],eax
58
	mov	[columns.scr],eax
59
 
59
 
60
	mov	eax,[cur_tab.Editor.Bounds.Bottom]
60
	mov	eax,[cur_editor.Bounds.Bottom]
61
	sub	eax,[cur_tab.Editor.Bounds.Top]
61
	sub	eax,[cur_editor.Bounds.Top]
62
	sub	eax,SCRLW+3
62
	sub	eax,SCRLW+3
Line 248... Line 248...
248
	jle	draw_file.exit
248
	jle	draw_file.exit
Line 249... Line 249...
249
 
249
 
250
	cmp	eax,ebx
250
	cmp	eax,ebx
251
	jle	@f
251
	jle	@f
252
	xchg	eax,ebx
252
	xchg	eax,ebx
253
    @@: cmp	eax,[cur_tab.Editor.TopLeft.Y] ;! eax,[top_line]
253
    @@: cmp	eax,[cur_editor.TopLeft.Y] ;! eax,[top_line]
254
	jge	@f
254
	jge	@f
255
	mov	eax,[cur_tab.Editor.TopLeft.Y] ;! eax,[top_line]
255
	mov	eax,[cur_editor.TopLeft.Y] ;! eax,[top_line]
256
    @@: mov	ecx,[cur_tab.Editor.TopLeft.Y] ;! ecx,[top_line]
256
    @@: mov	ecx,[cur_editor.TopLeft.Y] ;! ecx,[top_line]
257
	add	ecx,[lines.scr]
257
	add	ecx,[lines.scr]
258
	cmp	ebx,ecx
258
	cmp	ebx,ecx
259
	jl	@f
259
	jl	@f
260
	dec	ecx
260
	dec	ecx
Line 271... Line 271...
271
	sub	ecx,eax
271
	sub	ecx,eax
272
	inc	ecx
272
	inc	ecx
Line 273... Line 273...
273
 
273
 
274
	mov	ebx,[top_ofs]
274
	mov	ebx,[top_ofs]
275
	add	ebx,[left_ofs-2]
275
	add	ebx,[left_ofs-2]
276
	sub	eax,[cur_tab.Editor.TopLeft.Y] ;! eax,[top_line]
276
	sub	eax,[cur_editor.TopLeft.Y] ;! eax,[top_line]
277
	imul	eax,LINEH
277
	imul	eax,LINEH
Line 278... Line 278...
278
	add	ebx,eax
278
	add	ebx,eax
279
 
279
 
Line 280... Line 280...
280
	imul	ebp,[cur_tab.Editor.TopLeft.X],6*65536 ;! ebp,[left_col],6*65536
280
	imul	ebp,[cur_editor.TopLeft.X],6*65536 ;! ebp,[left_col],6*65536
281
	or	[draw_blines],-1
281
	or	[draw_blines],-1
282
 
282
 
Line 300... Line 300...
300
	pushad
300
	pushad
Line 301... Line 301...
301
 
301
 
302
	mov	ebx,[top_ofs]
302
	mov	ebx,[top_ofs]
Line 303... Line 303...
303
	add	ebx,[left_ofs-2]
303
	add	ebx,[left_ofs-2]
304
 
304
 
305
	mov	ecx,[cur_tab.Editor.TopLeft.Y] ;! ecx,[top_line]
305
	mov	ecx,[cur_editor.TopLeft.Y] ;! ecx,[top_line]
Line 306... Line 306...
306
	push	ecx
306
	push	ecx
307
	call	get_line_offset
307
	call	get_line_offset
308
 
308
 
309
  .start:
309
  .start:
310
	add	esp,4
310
	add	esp,4
311
	mov	ecx,[lines.scr]
311
	mov	ecx,[lines.scr]
Line 312... Line 312...
312
	or	ecx,ecx
312
	or	ecx,ecx
313
	jle	.exit
313
	jle	.exit
314
	add	esp,-4
314
	add	esp,-4
315
 
315
 
Line 316... Line 316...
316
	imul	ebp,[cur_tab.Editor.TopLeft.X],6*65536 ;! ebp,[left_col],6*65536
316
	imul	ebp,[cur_editor.TopLeft.X],6*65536 ;! ebp,[left_col],6*65536
Line 317... Line 317...
317
	mov	eax,[lines.scr]
317
	mov	eax,[lines.scr]
Line 344... Line 344...
344
	jmp	.lp6.2
344
	jmp	.lp6.2
345
  .lp1: mov	eax,[sel.begin.y]
345
  .lp1: mov	eax,[sel.begin.y]
346
	cmp	eax,[sel.end.y]
346
	cmp	eax,[sel.end.y]
347
	je	.lp5
347
	je	.lp5
348
  .lp2: mov	eax,[sel.begin.x]
348
  .lp2: mov	eax,[sel.begin.x]
349
	sub	eax,[cur_tab.Editor.TopLeft.X] ;! eax,[left_col]
349
	sub	eax,[cur_editor.TopLeft.X] ;! eax,[left_col]
350
	jle	.lp6.2
350
	jle	.lp6.2
351
	cmp	eax,[columns.scr]
351
	cmp	eax,[columns.scr]
352
	jge	.lp6
352
	jge	.lp6
353
	imul	eax,6
353
	imul	eax,6
354
	pushad
354
	pushad
Line 367... Line 367...
367
	jmp	.lp6
367
	jmp	.lp6
368
  .lp3: mov	eax,[sel.begin.y]
368
  .lp3: mov	eax,[sel.begin.y]
369
	cmp	eax,[sel.end.y]
369
	cmp	eax,[sel.end.y]
370
	je	.lp5
370
	je	.lp5
371
  .lp4: mov	eax,[sel.end.x]
371
  .lp4: mov	eax,[sel.end.x]
372
	sub	eax,[cur_tab.Editor.TopLeft.X] ;! eax,[left_col]
372
	sub	eax,[cur_editor.TopLeft.X] ;! eax,[left_col]
373
	jle	.lp6
373
	jle	.lp6
374
	cmp	eax,[columns.scr]
374
	cmp	eax,[columns.scr]
375
	jg	.lp6.2
375
	jg	.lp6.2
376
	imul	eax,6
376
	imul	eax,6
377
	pushad
377
	pushad
Line 386... Line 386...
386
	popad
386
	popad
387
	mov	edx,[color_tbl+4*7]
387
	mov	edx,[color_tbl+4*7]
388
	mov	bx,ax
388
	mov	bx,ax
389
	mov	[in_sel],3
389
	mov	[in_sel],3
390
	jmp	.lp6
390
	jmp	.lp6
391
  .lp5: mov	eax,[cur_tab.Editor.TopLeft.X] ;! eax,[left_col]
391
  .lp5: mov	eax,[cur_editor.TopLeft.X] ;! eax,[left_col]
392
	cmp	eax,[sel.begin.x]
392
	cmp	eax,[sel.begin.x]
393
	jge	.lp4
393
	jge	.lp4
394
	add	eax,[columns.scr]
394
	add	eax,[columns.scr]
395
	cmp	eax,[sel.end.x]
395
	cmp	eax,[sel.end.x]
396
	jl	.lp2
396
	jl	.lp2
397
	mov	eax,[sel.begin.x]
397
	mov	eax,[sel.begin.x]
398
	cmp	eax,[sel.end.x]
398
	cmp	eax,[sel.end.x]
399
	je	.lp6
399
	je	.lp6
400
	sub	eax,[cur_tab.Editor.TopLeft.X] ;! eax,[left_col]
400
	sub	eax,[cur_editor.TopLeft.X] ;! eax,[left_col]
401
	imul	eax,6
401
	imul	eax,6
402
	pushad
402
	pushad
403
	mov	ebx,[sel.end.x]
403
	mov	ebx,[sel.end.x]
404
	sub	ebx,[sel.begin.x]
404
	sub	ebx,[sel.begin.x]
405
;       inc     ebx
405
;       inc     ebx
Line 469... Line 469...
469
	push	ecx
469
	push	ecx
470
	mov	ecx,eax
470
	mov	ecx,eax
Line 471... Line 471...
471
 
471
 
472
	push	esi ebx
472
	push	esi ebx
473
	mov	eax,ebx
473
	mov	eax,ebx
474
	sub	ebx,[cur_tab.Editor.TopLeft.X] ;! ebx,[left_col]
474
	sub	ebx,[cur_editor.TopLeft.X] ;! ebx,[left_col]
475
	cmp	ebx,[columns.scr]
475
	cmp	ebx,[columns.scr]
476
	jge	.skip_t
476
	jge	.skip_t
477
	add	ebx,esi
477
	add	ebx,esi
478
	jle	.skip_t
478
	jle	.skip_t
479
	mov	ebx,[esp+8+4*2] ;// 4*2=esi+ebx
479
	mov	ebx,[esp+8+4*2] ;// 4*2=esi+ebx
480
	sub	eax,[cur_tab.Editor.TopLeft.X] ;! eax,[left_col]
480
	sub	eax,[cur_editor.TopLeft.X] ;! eax,[left_col]
481
	jge	.qqq
481
	jge	.qqq
482
	sub	edx,eax
482
	sub	edx,eax
483
	add	esi,eax
483
	add	esi,eax
484
;       mov     eax,OLEFT*65536
484
;       mov     eax,OLEFT*65536
Line 492... Line 492...
492
	add	eax,[left_ofs-2];OLEFT*65536
492
	add	eax,[left_ofs-2];OLEFT*65536
493
	add	ebx,eax
493
	add	ebx,eax
Line 494... Line 494...
494
 
494
 
495
	mov	eax,[esp]   ; ebx
495
	mov	eax,[esp]   ; ebx
496
	add	eax,[esp+4] ; esi
496
	add	eax,[esp+4] ; esi
497
	sub	eax,[cur_tab.Editor.TopLeft.X] ;! eax,[left_col]
497
	sub	eax,[cur_editor.TopLeft.X] ;! eax,[left_col]
498
	sub	eax,[columns.scr]
498
	sub	eax,[columns.scr]
499
	jle	.qweqwe
499
	jle	.qweqwe
500
	sub	esi,eax
500
	sub	esi,eax
Line 516... Line 516...
516
;---[ selection crosses block from the right ]-(-
516
;---[ selection crosses block from the right ]-(-
517
  .ya1: mov	eax,esi
517
  .ya1: mov	eax,esi
518
	mov	esi,[sel.begin.x]
518
	mov	esi,[sel.begin.x]
519
	sub	esi,[esp]
519
	sub	esi,[esp]
520
	pushad
520
	pushad
521
	mov	ecx,[cur_tab.Editor.TopLeft.X] ;! ecx,[left_col]
521
	mov	ecx,[cur_editor.TopLeft.X] ;! ecx,[left_col]
522
	sub	ecx,[esp+4*8]
522
	sub	ecx,[esp+4*8]
523
	jle	@f
523
	jle	@f
524
	sub	esi,ecx
524
	sub	esi,ecx
525
	sub	[esp+4],ecx
525
	sub	[esp+4],ecx
526
    @@: sub	eax,esi
526
    @@: sub	eax,esi
Line 546... Line 546...
546
;---[ selection crosses block from the left ]--(-
546
;---[ selection crosses block from the left ]--(-
547
  .ya2: mov	eax,[sel.end.x]
547
  .ya2: mov	eax,[sel.end.x]
548
	sub	eax,[esp]
548
	sub	eax,[esp]
549
	push	ebx
549
	push	ebx
550
	mov	ebx,[esp+4]
550
	mov	ebx,[esp+4]
551
	sub	ebx,[cur_tab.Editor.TopLeft.X] ;! ebx,[left_col]
551
	sub	ebx,[cur_editor.TopLeft.X] ;! ebx,[left_col]
552
	jge	.ya2.1
552
	jge	.ya2.1
553
	add	eax,ebx
553
	add	eax,ebx
554
  .ya2.1:
554
  .ya2.1:
555
	pop	ebx
555
	pop	ebx
556
	pushad
556
	pushad
Line 578... Line 578...
578
	mov	eax,esi
578
	mov	eax,esi
579
	mov	esi,[sel.begin.x]
579
	mov	esi,[sel.begin.x]
580
	sub	esi,[esp]
580
	sub	esi,[esp]
581
	push	eax
581
	push	eax
582
	mov	eax,[esp+4]
582
	mov	eax,[esp+4]
583
	sub	eax,[cur_tab.Editor.TopLeft.X] ;! eax,[left_col]
583
	sub	eax,[cur_editor.TopLeft.X] ;! eax,[left_col]
584
	jge	.nt3.1
584
	jge	.nt3.1
585
	add	esi,eax
585
	add	esi,eax
586
  .nt3.1:
586
  .nt3.1:
587
	pop	eax
587
	pop	eax
588
	sub	eax,esi
588
	sub	eax,esi
Line 659... Line 659...
659
	mov	ebx,[left_ofs]
659
	mov	ebx,[left_ofs]
660
	add	ebx,-3-LCHGW
660
	add	ebx,-3-LCHGW
661
	shl	ebx,16
661
	shl	ebx,16
662
	add	ebx,[top_ofs]
662
	add	ebx,[top_ofs]
663
	mov	edi,[sc.work_text]
663
	mov	edi,[sc.work_text]
664
	mov	ecx,[cur_tab.Editor.TopLeft.Y] ;! ecx,[top_line]
664
	mov	ecx,[cur_editor.TopLeft.Y] ;! ecx,[top_line]
665
	inc	ecx
665
	inc	ecx
666
	mov	edx,p_info+100
666
	mov	edx,p_info+100
667
    @@: pushad
667
    @@: pushad
668
	push	eax edx edi
668
	push	eax edx edi
669
	mov	eax,ecx
669
	mov	eax,ecx
Line 677... Line 677...
677
	sub	ebx,eax
677
	sub	ebx,eax
678
	mcall	4,,edi
678
	mcall	4,,edi
679
	popad
679
	popad
680
	add	ebx,LINEH
680
	add	ebx,LINEH
681
	inc	ecx
681
	inc	ecx
682
	cmp	ecx,[cur_tab.Editor.Lines] ;! ecx,[lines]
682
	cmp	ecx,[cur_editor.Lines] ;! ecx,[lines]
683
	jg	@f
683
	jg	@f
684
	mov	esi,ecx
684
	mov	esi,ecx
685
	sub	esi,[cur_tab.Editor.TopLeft.Y] ;! esi,[top_line]
685
	sub	esi,[cur_editor.TopLeft.Y] ;! esi,[top_line]
686
	cmp	esi,[lines.scr]
686
	cmp	esi,[lines.scr]
687
	jbe	@b
687
	jbe	@b
688
    @@: add	esp,4*8*2
688
    @@: add	esp,4*8*2
Line 689... Line 689...
689
 
689
 
Line 705... Line 705...
705
    @@:
705
    @@:
Line 706... Line 706...
706
 
706
 
707
	add	esp,4
707
	add	esp,4
708
	cmp	[bot_mode],0
708
	cmp	[bot_mode],0
709
	jne	@f
709
	jne	@f
710
	mov	ebx,[cur_tab.Editor.Caret.X] ;! ebx,[pos.x]
710
	mov	ebx,[cur_editor.Caret.X] ;! ebx,[pos.x]
711
	sub	ebx,[cur_tab.Editor.TopLeft.X] ;! ebx,[left_col]
711
	sub	ebx,[cur_editor.TopLeft.X] ;! ebx,[left_col]
712
	js	@f
712
	js	@f
713
	cmp	ebx,[columns.scr]
713
	cmp	ebx,[columns.scr]
714
	ja	@f
714
	ja	@f
715
	imul	ebx,6
715
	imul	ebx,6
716
	add	ebx,[left_ofs]
716
	add	ebx,[left_ofs]
717
	dec	ebx
717
	dec	ebx
718
	push	bx
718
	push	bx
719
	shl	ebx,16
719
	shl	ebx,16
720
	pop	bx
720
	pop	bx
721
	mov	eax,[cur_tab.Editor.Caret.Y] ;! eax,[pos.y]
721
	mov	eax,[cur_editor.Caret.Y] ;! eax,[pos.y]
722
	sub	eax,[cur_tab.Editor.TopLeft.Y] ;! eax,[top_line]
722
	sub	eax,[cur_editor.TopLeft.Y] ;! eax,[top_line]
723
	js	@f
723
	js	@f
724
	cmp	eax,[lines.scr]
724
	cmp	eax,[lines.scr]
725
	jge	@f
725
	jge	@f
726
	imul	eax,LINEH
726
	imul	eax,LINEH
Line 803... Line 803...
803
	add	esp,4
803
	add	esp,4
804
	popad
804
	popad
805
;        sub     ebx,1*65536-2
805
;        sub     ebx,1*65536-2
Line 806... Line 806...
806
 
806
 
807
	push	ebx
807
	push	ebx
808
	mov	eax,[cur_tab.Editor.Lines] ;! eax,[lines]
808
	mov	eax,[cur_editor.Lines] ;! eax,[lines]
809
	mov	ebx,[lines.scr]
809
	mov	ebx,[lines.scr]
810
	mov	ecx,[cur_tab.Editor.TopLeft.Y] ;! ecx,[top_line]
810
	mov	ecx,[cur_editor.TopLeft.Y] ;! ecx,[top_line]
811
	mov	edx,[bot_ofs]
811
	mov	edx,[bot_ofs]
812
	sub	edx,[top_ofs]
812
	sub	edx,[top_ofs]
813
	add	edx,-SCRLW*3+1
813
	add	edx,-SCRLW*3+1
814
	call	get_scroll_vars
814
	call	get_scroll_vars
815
	mov	[cur_tab.Editor.VScroll.Top],eax ;! [vscrl_top],eax
815
	mov	[cur_editor.VScroll.Top],eax ;! [vscrl_top],eax
816
	mov	[cur_tab.Editor.VScroll.Size],ebx ;! [vscrl_size],ebx
816
	mov	[cur_editor.VScroll.Size],ebx ;! [vscrl_size],ebx
Line 817... Line 817...
817
	pop	ebx
817
	pop	ebx
818
 
818
 
819
	mov	ecx,eax
819
	mov	ecx,eax
Line 827... Line 827...
827
	pushad
827
	pushad
828
	sar	ebx,16
828
	sar	ebx,16
829
;        rol     ecx,16
829
;        rol     ecx,16
830
;        movsx   eax,cx
830
;        movsx   eax,cx
831
;        sar     ecx,16
831
;        sar     ecx,16
832
	push	ebx ecx SCRLW [cur_tab.Editor.VScroll.Size] ;! ebx ecx SCRLW [vscrl_size]
832
	push	ebx ecx SCRLW [cur_editor.VScroll.Size] ;! ebx ecx SCRLW [vscrl_size]
833
	dec	dword[esp]
833
	dec	dword[esp]
834
	call	draw_3d_panel
834
	call	draw_3d_panel
835
	popad
835
	popad
836
	mov	eax,13
836
	mov	eax,13
837
;!!!!!!!!!!!!!!!!!!
837
;!!!!!!!!!!!!!!!!!!
838
	inc	ebx
838
	inc	ebx
Line 839... Line 839...
839
 
839
 
840
	mov	ecx,[top_ofs-2]
840
	mov	ecx,[top_ofs-2]
841
	mov	cx,word[cur_tab.Editor.VScroll.Top] ;! cx,word[vscrl_top]
841
	mov	cx,word[cur_editor.VScroll.Top] ;! cx,word[vscrl_top]
842
	add	ecx,(SCRLW-1)*65536
842
	add	ecx,(SCRLW-1)*65536
843
	mov	edx,[sc.work];[color_tbl+4*5]
843
	mov	edx,[sc.work];[color_tbl+4*5]
844
	or	cx,cx
844
	or	cx,cx
845
	jle	@f
845
	jle	@f
846
	mcall	13
846
	mcall	13
847
    @@:
847
    @@:
848
	mov	ecx,[top_ofs]
848
	mov	ecx,[top_ofs]
849
	add	ecx,[cur_tab.Editor.VScroll.Top] ;! ecx,[vscrl_top]
849
	add	ecx,[cur_editor.VScroll.Top] ;! ecx,[vscrl_top]
850
	add	ecx,[cur_tab.Editor.VScroll.Size] ;! ecx,[vscrl_size]
850
	add	ecx,[cur_editor.VScroll.Size] ;! ecx,[vscrl_size]
851
	add	ecx,SCRLW-1
851
	add	ecx,SCRLW-1
852
	mov	di,cx
852
	mov	di,cx
853
	shl	ecx,16
853
	shl	ecx,16
854
	mov	cx,word[bot_ofs]
854
	mov	cx,word[bot_ofs]
Line 932... Line 932...
932
	add	esp,4
932
	add	esp,4
933
	popad
933
	popad
934
;       inc     ecx
934
;       inc     ecx
Line 935... Line 935...
935
 
935
 
936
	push	ecx
936
	push	ecx
937
	mov	eax,[cur_tab.Editor.Columns] ;! eax,[columns]
937
	mov	eax,[cur_editor.Columns] ;! eax,[columns]
938
	mov	ebx,[columns.scr]
938
	mov	ebx,[columns.scr]
939
	mov	ecx,[cur_tab.Editor.TopLeft.X] ;! ecx,[left_col]
939
	mov	ecx,[cur_editor.TopLeft.X] ;! ecx,[left_col]
940
	mov	edx,[p_info.client_box.width]
940
	mov	edx,[p_info.client_box.width]
941
	add	edx,-(SCRLW*3)
941
	add	edx,-(SCRLW*3)
942
	call	get_scroll_vars
942
	call	get_scroll_vars
943
	mov	[cur_tab.Editor.HScroll.Top],eax ;! [hscrl_top],eax
943
	mov	[cur_editor.HScroll.Top],eax ;! [hscrl_top],eax
944
	mov	[cur_tab.Editor.HScroll.Size],ebx ;! [hscrl_size],ebx
944
	mov	[cur_editor.HScroll.Size],ebx ;! [hscrl_size],ebx
Line 945... Line 945...
945
	pop	ecx
945
	pop	ecx
946
 
946
 
947
	mov	ebx,eax
947
	mov	ebx,eax
948
	add	ebx,1+SCRLW
948
	add	ebx,1+SCRLW
Line 949... Line 949...
949
	shl	ebx,16
949
	shl	ebx,16
950
	mov	bx,word[cur_tab.Editor.HScroll.Size] ;! bx,word[hscrl_size]
950
	mov	bx,word[cur_editor.HScroll.Size] ;! bx,word[hscrl_size]
951
 
951
 
952
;        mcall   13,,,[sc.work_button]
952
;        mcall   13,,,[sc.work_button]
Line 961... Line 961...
961
	call	draw_3d_panel
961
	call	draw_3d_panel
962
	popad
962
	popad
963
;!!!!!!!!!!!!!!!!!!
963
;!!!!!!!!!!!!!!!!!!
Line 964... Line 964...
964
 
964
 
965
	mov	ebx,(1+SCRLW)*65536
965
	mov	ebx,(1+SCRLW)*65536
966
	mov	bx,word[cur_tab.Editor.HScroll.Top] ;! bx,word[hscrl_top]
966
	mov	bx,word[cur_editor.HScroll.Top] ;! bx,word[hscrl_top]
967
	mcall	13,,,[sc.work];[color_tbl+4*5]
967
	mcall	13,,,[sc.work];[color_tbl+4*5]
968
	mov	ebx,1+SCRLW
968
	mov	ebx,1+SCRLW
969
	add	ebx,[cur_tab.Editor.HScroll.Top] ;! ebx,[hscrl_top]
969
	add	ebx,[cur_editor.HScroll.Top] ;! ebx,[hscrl_top]
970
	add	ebx,[cur_tab.Editor.HScroll.Size] ;! ebx,[hscrl_size]
970
	add	ebx,[cur_editor.HScroll.Size] ;! ebx,[hscrl_size]
971
	mov	di,bx
971
	mov	di,bx
972
	shl	ebx,16
972
	shl	ebx,16
973
	mov	bx,word[p_info.client_box.width]
973
	mov	bx,word[p_info.client_box.width]
974
	sub	bx,di
974
	sub	bx,di
Line 1009... Line 1009...
1009
; Output:
1009
; Output:
1010
;  ECX = color
1010
;  ECX = color
1011
;  EDX = string
1011
;  EDX = string
1012
;  ESI = length
1012
;  ESI = length
1013
;-----------------------------------------------------------------------------
1013
;-----------------------------------------------------------------------------
1014
	cmp	[cur_tab.Editor.AsmMode],0 ;! [asm_mode],0
1014
	cmp	[cur_editor.AsmMode],0 ;! [asm_mode],0
1015
	je	.plain.text
1015
	je	.plain.text
1016
	xor	ebx,ebx
1016
	xor	ebx,ebx
1017
	mov	edx,ecx
1017
	mov	edx,ecx
1018
	add	esi,ecx
1018
	add	esi,ecx
1019
	mov	edi,symbols
1019
	mov	edi,symbols
Line 1157... Line 1157...
1157
	mcall
1157
	mcall
Line 1158... Line 1158...
1158
 
1158
 
1159
	and	ecx,0x0000FFFF
1159
	and	ecx,0x0000FFFF
Line 1160... Line 1160...
1160
	push	ecx
1160
	push	ecx
1161
 
1161
 
1162
	mov	eax,[cur_tab.Editor.Caret.Y] ;! eax,[pos.y]
1162
	mov	eax,[cur_editor.Caret.Y] ;! eax,[pos.y]
1163
	inc	eax
1163
	inc	eax
1164
	mov	ecx,10
1164
	mov	ecx,10
1165
	mov	edi,p_info+0x100;htext2.pos1
1165
	mov	edi,p_info+0x100;htext2.pos1
1166
	cld
1166
	cld
1167
	call	uint2str
1167
	call	uint2str
1168
	mov	al,','
1168
	mov	al,','
1169
	stosb
1169
	stosb
1170
	mov	eax,[cur_tab.Editor.Caret.X] ;! eax,[pos.x]
1170
	mov	eax,[cur_editor.Caret.X] ;! eax,[pos.x]
Line 1171... Line 1171...
1171
	inc	eax
1171
	inc	eax
Line 1180... Line 1180...
1180
;       add     ebx,[left_ofs-2]
1180
;       add     ebx,[left_ofs-2]
1181
	add	ebx,(1+6*6+3)*65536-STATH/2-3
1181
	add	ebx,(1+6*6+3)*65536-STATH/2-3
1182
	sub	ebx,edi
1182
	sub	ebx,edi
1183
	mcall	4,,[sc.work_text],p_info+0x100
1183
	mcall	4,,[sc.work_text],p_info+0x100
Line 1184... Line 1184...
1184
 
1184
 
1185
	cmp	[cur_tab.Editor.Modified],0 ;! [modified],0
1185
	cmp	[cur_editor.Modified],0 ;! [modified],0
1186
	je	@f
1186
	je	@f
1187
	and	ebx,0x0000FFFF
1187
	and	ebx,0x0000FFFF
1188
;       add     ebx,[left_ofs-2]
1188
;       add     ebx,[left_ofs-2]
1189
	add	ebx,(1+12*6+12+1)*65536
1189
	add	ebx,(1+12*6+12+1)*65536
Line 1232... Line 1232...
1232
	mcall
1232
	mcall
Line 1233... Line 1233...
1233
 
1233
 
1234
	pop	ecx ebx
1234
	pop	ecx ebx
1235
	ret
1235
	ret
1236
endf
1236
endf
-
 
1237
 
-
 
1238
func calc_middle
-
 
1239
	shr	eax,1
-
 
1240
	shr	ebx,1
-
 
1241
	and	eax,0x007F7F7F
-
 
1242
	and	ebx,0x007F7F7F
-
 
1243
	add	eax,ebx
-
 
1244
	ret
-
 
1245
endf
-
 
1246
 
-
 
1247
func calc_3d_colors
-
 
1248
	pushad
-
 
1249
	m2m	[cl_3d_normal],[sc.work]
-
 
1250
	m2m	[cl_3d_inset],[sc.work_graph]
-
 
1251
	push	[cl_3d_normal]
-
 
1252
	add	byte[esp],48
-
 
1253
	jnc	@f
-
 
1254
	mov	byte[esp],255
-
 
1255
    @@: add	byte[esp+1],48
-
 
1256
	jnc	@f
-
 
1257
	mov	byte[esp+1],255
-
 
1258
    @@: add	byte[esp+2],48
-
 
1259
	jnc	@f
-
 
1260
	mov	byte[esp+2],255
-
 
1261
    @@: pop	[cl_3d_outset]
-
 
1262
	mov	eax,[cl_3d_inset]
-
 
1263
	mov	ebx,[cl_3d_outset]
-
 
1264
	call	calc_middle
-
 
1265
	mov	[cl_3d_pushed],eax
-
 
1266
	mov	eax,[cl_3d_normal]
-
 
1267
	mov	ebx,[sc.work_text]
-
 
1268
	call	calc_middle
-
 
1269
	mov	[cl_3d_grayed],eax
-
 
1270
	popad
-
 
1271
	ret
-
 
1272
endf
-
 
1273
 
-
 
1274
func draw_3d_panel ; x,y,w,h
-
 
1275
	push	eax ebx ecx edx
-
 
1276
	cmp	dword[esp+16+8],4
-
 
1277
	jl	.exit
-
 
1278
	cmp	dword[esp+16+4],4
-
 
1279
	jl	.exit
-
 
1280
	mov	ebx,[esp+16+16-2]
-
 
1281
	mov	bx,[esp+16+8]
-
 
1282
	inc	ebx
-
 
1283
	mov	ecx,[esp+16+12-2]
-
 
1284
	mov	cx,[esp+16+4]
-
 
1285
	inc	ecx
-
 
1286
	mcall	13,,,[cl_3d_normal]
-
 
1287
	dec	ebx
-
 
1288
	add	bx,[esp+16+16]
-
 
1289
	mov	cx,[esp+16+12]
-
 
1290
	mcall	38,,,[cl_3d_inset]
-
 
1291
	add	ecx,[esp+16+4-2]
-
 
1292
	add	cx,[esp+16+4]
-
 
1293
	mcall
-
 
1294
	mov	bx,[esp+16+16]
-
 
1295
	mov	ecx,[esp+16+12-2]
-
 
1296
	mov	cx,[esp+16+4]
-
 
1297
	add	cx,[esp+16+12]
-
 
1298
	mcall
-
 
1299
	add	ebx,[esp+16+8-2]
-
 
1300
	add	bx,[esp+16+8]
-
 
1301
	mcall
-
 
1302
	mov	ebx,[esp+16+16-2]
-
 
1303
	mov	bx,[esp+16+8]
-
 
1304
	add	bx,[esp+16+16]
-
 
1305
	add	ebx,1*65536-1
-
 
1306
	mov	ecx,[esp+16+12-2]
-
 
1307
	mov	cx,[esp+16+12]
-
 
1308
	add	ecx,0x00010001
-
 
1309
	mcall	,,,[cl_3d_outset]
-
 
1310
	mov	bx,[esp+16+16]
-
 
1311
	inc	ebx
-
 
1312
	mov	ecx,[esp+16+12-2]
-
 
1313
	mov	cx,[esp+16+4]
-
 
1314
	add	cx,[esp+16+12]
-
 
1315
	add	ecx,2*65536-1
-
 
1316
	mcall
-
 
1317
  .exit:
-
 
1318
	pop	edx ecx ebx eax
-
 
1319
	ret	4*4
-
 
1320
endf