Subversion Repositories Kolibri OS

Rev

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

Rev 280 Rev 297
Line 10... Line 10...
10
	mcall	48,3,sc,sizeof.system_colors
10
	mcall	48,3,sc,sizeof.system_colors
11
	call	calc_3d_colors
11
	call	calc_3d_colors
Line 12... Line 12...
12
 
12
 
Line 13... Line 13...
13
	mcall	12,1
13
	mcall	12,1
14
 
-
 
Line 15... Line 14...
15
	push	[color_tbl+4*5]
14
 
16
	pop	[sc.work]
15
	m2m	[sc.work],dword[color_tbl.back]
17
 
16
 
18
	mov	edx,[sc.work]
17
	mov	edx,[sc.work]
Line 28... Line 27...
28
	mov	edi,mainwnd_pos
27
	mov	edi,mainwnd_pos
29
	mov	ecx,4
28
	mov	ecx,4
30
	cld
29
	cld
31
	rep	movsd
30
	rep	movsd
Line 32... Line -...
32
 
-
 
33
;       mcall   9,p_info,-1
31
 
34
	cmp	[p_info.client_box.height],LINEH
32
	cmp	[p_info.client_box.height],LINEH
Line 35... Line -...
35
	jl	.exit.2
-
 
36
 
33
	jl	.exit.2
37
;++ calculate editor bounds ++
34
 
38
	mov	[tab_bar.Bounds.Left],0
35
	mov	[tab_bar.Bounds.Left],0
39
	mov	[tab_bar.Bounds.Top],ATOPH
36
	mov	[tab_bar.Bounds.Top],ATOPH
40
	mov	eax,[p_info.client_box.width]
37
	mov	eax,[p_info.client_box.width]
Line 46... Line 43...
46
 
43
 
Line 47... Line 44...
47
	call	align_editor_in_tab
44
	call	align_editor_in_tab
Line 48... Line -...
48
 
-
 
49
	mov	[top_ofs],ATOPH;+1
-
 
50
 
45
 
51
	;// --- columns.scr and lines.scr calculation ---
46
	mov	[top_ofs],ATOPH;+1
52
 
47
 
53
	mov	eax,[p_info.client_box.height]
48
	mov	eax,[p_info.client_box.height]
Line 70... Line 65...
70
;        cdq
65
;        cdq
71
;        mov     ebx,LINEH
66
;        mov     ebx,LINEH
72
;        div     ebx
67
;        div     ebx
73
;        mov     [lines.scr],eax
68
;        mov     [lines.scr],eax
Line 74... Line -...
74
 
-
 
75
;-- horizontal lines for menubar and statusbar --
-
 
76
	;mov     ebx,[p_info.client_box.width]
-
 
77
	;mov     ecx,[top_ofs-2]
-
 
78
	;mov     cx,word[top_ofs]
-
 
79
	;sub     ecx,1*65536+1
-
 
80
	;mcall   38,,,[cl_3d_inset];[sc.work_text]
-
 
81
	;mov     ecx,[p_info.client_box.height]
-
 
82
	;sub     ecx,STATH+1
-
 
83
	;push    cx
-
 
84
	;shl     ecx,16
-
 
85
	;pop     cx
-
 
86
	;mcall
-
 
87
 
69
 
Line 88... Line 70...
88
	inc	[top_ofs]
70
	inc	[top_ofs]
Line 89... Line 71...
89
 
71
 
Line 123... Line 105...
123
	idiv	ebx
105
	idiv	ebx
124
	mov	[columns.scr],eax
106
	mov	[columns.scr],eax
125
    @@:
107
    @@:
Line 126... Line 108...
126
 
108
 
127
  .exit:
-
 
128
;-- draw file --
-
 
129
	;call    draw_file
-
 
130
;++ draw editor control ++
109
  .exit:
131
	call	draw_editor
110
	call	draw_editor
132
	call	draw_tabctl
111
	call	draw_tabctl
133
  .exit.2:
112
  .exit.2:
134
	mcall	12,2
113
	mcall	12,2
Line 174... Line 153...
174
 
153
 
Line 175... Line 154...
175
	mcall	38,[p_info.client_box.width],,[cl_3d_inset]
154
	mcall	38,[p_info.client_box.width],,[cl_3d_inset]
176
 
155
 
177
	mov	edx,main_menu
-
 
178
	mov	ebx,9*65536+ATOPH/2-3;4
156
	mov	edx,main_menu
179
	;mov     ecx,[sc.work_text]
157
	mov	ebx,9*65536+ATOPH/2-3;4
180
	mov	[mi_sel],0
158
	mov	[mi_sel],0
181
	mov	edi,[mi_cur]
159
	mov	edi,[mi_cur]
182
    @@: inc	[mi_sel]
160
    @@: inc	[mi_sel]
183
	cmp	[mi_sel],main_menu.cnt_item
161
	cmp	[mi_sel],main_menu.cnt_item
184
	ja	.exit
162
	ja	.exit
185
	mov	ecx,[sc.work_text]
163
	mov	ecx,[sc.work_text]
186
	cmp	edi,[mi_sel]
164
	cmp	edi,[mi_sel]
187
	jne	.lp1
165
	jne	.lp1
188
	pushad
-
 
189
	push	edx
166
	pushad
190
	;mov     ebx,[edx+0]
167
	push	edx
191
	mov	ecx,[edx+4]
168
	mov	ecx,[edx+4]
192
	add	ecx,2*65536-2
169
	add	ecx,2*65536-2
193
	mcall	13,[edx+0],,[sc.work];[cl_3d_pushed]
170
	mcall	13,[edx+0],,[sc.work]
194
	mov	edx,[esp]
171
	mov	edx,[esp]
195
	mov	cx,[edx+6]
172
	mov	cx,[edx+6]
196
	add	ecx,-1*65536+1
173
	add	ecx,-1*65536+1
Line 197... Line 174...
197
	add	bx,[edx+2]
174
	add	bx,[edx+2]
198
	mcall	38,,,[cl_3d_inset]
175
	mcall	38,,,[cl_3d_inset]
199
 
176
 
200
	mov	edx,[esp]
177
	mov	edx,[esp]
201
	add	cx,[edx+4]
178
	add	cx,[edx+4]
202
	add	cx,-2
179
	add	cx,-2
203
	mov	bx,[edx+2]
180
	mov	bx,[edx+2]
204
	mcall	38,,,[cl_3d_inset]
181
	mcall	,,,[cl_3d_inset]
205
	pop	edx
182
	pop	edx
206
	movzx	eax,word[edx]
183
	movzx	eax,word[edx]
207
	add	ebx,eax
184
	add	ebx,eax
208
	shl	eax,16
185
	shl	eax,16
209
	add	ebx,eax
186
	add	ebx,eax
210
	mcall	38,,,[cl_3d_inset]
187
	mcall	38,,,[cl_3d_inset]
211
	popad
188
	popad
212
	mov	ecx,[color_tbl+4*0]
189
	mov	ecx,[color_tbl.text]
213
  .lp1: add	edx,8+1
190
  .lp1: add	edx,8+1
214
	movzx	esi,byte[edx-1]
191
	movzx	esi,byte[edx-1]
Line 222... Line 199...
222
  .exit:
199
  .exit:
223
	ret
200
	ret
224
endf
201
endf
Line 225... Line 202...
225
 
202
 
226
;-----------------------------------------------------------------------------
-
 
227
func draw_file.ex ;///////////////////////////////////////////////////////////
-
 
228
;-----------------------------------------------------------------------------
-
 
229
; Input:
-
 
230
;  EAX = start line
-
 
231
;  EBX = end line
-
 
232
;-----------------------------------------------------------------------------
-
 
233
	call	draw_editor;_text
-
 
234
	ret
-
 
235
macro unused {
-
 
236
	cmp	[p_info.client_box.height],LINEH
-
 
237
	jge	@f
-
 
238
	ret
-
 
239
    @@:
-
 
240
	call	init_sel_vars
-
 
241
	call	check_bottom_right
-
 
242
 
-
 
243
	pushad
-
 
244
 
-
 
245
	cmp	[lines.scr],0
-
 
246
	jle	draw_file.exit
-
 
247
 
-
 
248
	cmp	eax,ebx
-
 
249
	jle	@f
-
 
250
	xchg	eax,ebx
-
 
251
    @@: cmp	eax,[cur_editor.TopLeft.Y] ;! eax,[top_line]
-
 
252
	jge	@f
-
 
253
	mov	eax,[cur_editor.TopLeft.Y] ;! eax,[top_line]
-
 
254
    @@: mov	ecx,[cur_editor.TopLeft.Y] ;! ecx,[top_line]
-
 
255
	add	ecx,[lines.scr]
-
 
256
	cmp	ebx,ecx
-
 
257
	jl	@f
-
 
258
	dec	ecx
-
 
259
	mov	ebx,ecx
-
 
260
    @@: cmp	eax,ebx
-
 
261
	jg	draw_file.exit
-
 
262
 
-
 
263
	mov	ecx,eax
-
 
264
	push	eax
-
 
265
	call	get_line_offset
-
 
266
 
-
 
267
  .start:
-
 
268
	mov	ecx,ebx
-
 
269
	sub	ecx,eax
-
 
270
	inc	ecx
-
 
271
 
-
 
272
	mov	ebx,[top_ofs]
-
 
273
	add	ebx,[left_ofs-2]
-
 
274
	sub	eax,[cur_editor.TopLeft.Y] ;! eax,[top_line]
-
 
275
	imul	eax,LINEH
-
 
276
	add	ebx,eax
-
 
277
 
-
 
278
	imul	ebp,[cur_editor.TopLeft.X],6*65536 ;! ebp,[left_col],6*65536
-
 
279
	or	[draw_blines],-1
-
 
280
 
-
 
281
	jmp	draw_file.next_line
-
 
282
}
-
 
283
endf
-
 
284
 
-
 
285
;-----------------------------------------------------------------------------
-
 
286
func draw_file ;//////////////////////////////////////////////////////////////
-
 
287
;-----------------------------------------------------------------------------
-
 
288
	call	draw_editor;_text
-
 
289
	ret
-
 
290
macro unused {
-
 
291
	cmp	[p_info.client_box.height],LINEH
-
 
292
	jge	@f
-
 
293
	ret
-
 
294
    @@:
-
 
295
	call	init_sel_vars
-
 
296
	call	check_bottom_right
-
 
297
 
-
 
298
	pushad
-
 
299
 
-
 
300
	mov	ebx,[top_ofs]
-
 
301
	add	ebx,[left_ofs-2]
-
 
302
 
-
 
303
	mov	ecx,[cur_editor.TopLeft.Y] ;! ecx,[top_line]
-
 
304
	push	ecx
-
 
305
	call	get_line_offset
-
 
306
 
-
 
307
  .start:
-
 
308
	add	esp,4
-
 
309
	mov	ecx,[lines.scr]
-
 
310
	or	ecx,ecx
-
 
311
	jle	.exit
-
 
312
	add	esp,-4
-
 
313
 
-
 
314
	imul	ebp,[cur_editor.TopLeft.X],6*65536 ;! ebp,[left_col],6*65536
-
 
315
	mov	eax,[lines.scr]
-
 
316
	sub	eax,[cur_editor.Lines] ;! eax,[lines]
-
 
317
	mov	[draw_blines],eax
-
 
318
 
-
 
319
  .next_line:
-
 
320
 
-
 
321
	push	ecx ebx
-
 
322
 
-
 
323
	mov	ecx,ebx
-
 
324
	shl	ecx,16
-
 
325
	mov	cl,LINEH
-
 
326
	mov	ebx,[p_info.client_box.width]
-
 
327
	add	ebx,-SCRLW
-
 
328
	add	ebx,[left_ofs-2]
-
 
329
	sub	ebx,[left_ofs]
-
 
330
	add	ebx,-1*65536+1
-
 
331
 
-
 
332
  ; selection (text background)
-
 
333
	mov	[in_sel],0
-
 
334
	mov	edx,[color_tbl+4*5]
-
 
335
	mov	eax,[esp+4*2]
-
 
336
	cmp	eax,[sel.begin.y]
-
 
337
	jl	.lp6
-
 
338
	je	.lp1
-
 
339
	cmp	eax,[sel.end.y]
-
 
340
	jg	.lp6
-
 
341
	je	.lp3
-
 
342
	jmp	.lp6.2
-
 
343
  .lp1: mov	eax,[sel.begin.y]
-
 
344
	cmp	eax,[sel.end.y]
-
 
345
	je	.lp5
-
 
346
  .lp2: mov	eax,[sel.begin.x]
-
 
347
	sub	eax,[cur_editor.TopLeft.X] ;! eax,[left_col]
-
 
348
	jle	.lp6.2
-
 
349
	cmp	eax,[columns.scr]
-
 
350
	jge	.lp6
-
 
351
	imul	eax,6
-
 
352
	pushad
-
 
353
	sub	bx,ax
-
 
354
	rol	ebx,16
-
 
355
	mov	bx,ax
-
 
356
	add	ebx,[left_ofs];OLEFT-1
-
 
357
	dec	ebx
-
 
358
	rol	ebx,16
-
 
359
	mov	edx,[color_tbl+4*7]
-
 
360
	mcall	13
-
 
361
	popad
-
 
362
;       inc     eax
-
 
363
	mov	bx,ax
-
 
364
	mov	[in_sel],2
-
 
365
	jmp	.lp6
-
 
366
  .lp3: mov	eax,[sel.begin.y]
-
 
367
	cmp	eax,[sel.end.y]
-
 
368
	je	.lp5
-
 
369
  .lp4: mov	eax,[sel.end.x]
-
 
370
	sub	eax,[cur_editor.TopLeft.X] ;! eax,[left_col]
-
 
371
	jle	.lp6
-
 
372
	cmp	eax,[columns.scr]
-
 
373
	jg	.lp6.2
-
 
374
	imul	eax,6
-
 
375
	pushad
-
 
376
	sub	bx,ax
-
 
377
	rol	ebx,16
-
 
378
	add	eax,[left_ofs];OLEFT-1
-
 
379
	dec	eax
-
 
380
	mov	bx,ax
-
 
381
	rol	ebx,16
-
 
382
;       inc     ebx
-
 
383
	mcall	13
-
 
384
	popad
-
 
385
	mov	edx,[color_tbl+4*7]
-
 
386
	mov	bx,ax
-
 
387
	mov	[in_sel],3
-
 
388
	jmp	.lp6
-
 
389
  .lp5: mov	eax,[cur_editor.TopLeft.X] ;! eax,[left_col]
-
 
390
	cmp	eax,[sel.begin.x]
-
 
391
	jge	.lp4
-
 
392
	add	eax,[columns.scr]
-
 
393
	cmp	eax,[sel.end.x]
-
 
394
	jl	.lp2
-
 
395
	mov	eax,[sel.begin.x]
-
 
396
	cmp	eax,[sel.end.x]
-
 
397
	je	.lp6
-
 
398
	sub	eax,[cur_editor.TopLeft.X] ;! eax,[left_col]
-
 
399
	imul	eax,6
-
 
400
	pushad
-
 
401
	mov	ebx,[sel.end.x]
-
 
402
	sub	ebx,[sel.begin.x]
-
 
403
;       inc     ebx
-
 
404
	imul	ebx,6
-
 
405
	sal	ebx,16
-
 
406
	dec	eax
-
 
407
	add	eax,[left_ofs]
-
 
408
	mov	bx,ax
-
 
409
	rol	ebx,16
-
 
410
	mov	edx,[color_tbl+4*7]
-
 
411
	mcall	13
-
 
412
	movzx	eax,bx
-
 
413
	sar	ebx,16
-
 
414
	add	eax,ebx
-
 
415
	mov	ebx,eax
-
 
416
	sal	ebx,16
-
 
417
	sub	ax,[esp+4*4]
-
 
418
	neg	ax
-
 
419
	add	ax,word[left_ofs]
-
 
420
	mov	bx,ax
-
 
421
	mov	edx,[color_tbl+4*5]
-
 
422
	mcall	13
-
 
423
	popad
-
 
424
	mov	bx,ax
-
 
425
	mov	[in_sel],4
-
 
426
	jmp	.lp6
-
 
427
 
-
 
428
  .lp6.2:
-
 
429
	mov	edx,[color_tbl+4*7]
-
 
430
	inc	[in_sel]
-
 
431
  .lp6:
-
 
432
	mcall	13
-
 
433
 
-
 
434
	lodsd
-
 
435
 
-
 
436
	pushad
-
 
437
	mov	edx,[color_tbl+4*5]
-
 
438
	test	eax,0x00010000
-
 
439
	jz	@f
-
 
440
	mov	edx,[color_tbl+4*8]
-
 
441
	test	eax,0x00020000
-
 
442
	jz	@f
-
 
443
	mov	edx,[color_tbl+4*9]
-
 
444
    @@: mov	ebx,[left_ofs]
-
 
445
	add	ebx,-4
-
 
446
	shl	ebx,16
-
 
447
	mov	bx,LCHGW
-
 
448
	mcall	13
-
 
449
	popad
-
 
450
 
-
 
451
 
-
 
452
	xor	ecx,ecx
-
 
453
	and	eax,0x0000FFFF
-
 
454
	mov	[cur_line_len],eax
-
 
455
 
-
 
456
	or	eax,eax
-
 
457
	ja	.next_block
-
 
458
	add	esp,4*2
-
 
459
	jmp	.draw_cursor
-
 
460
 
-
 
461
  .next_block:
-
 
462
 
-
 
463
	push	esi ecx
-
 
464
	call	get_next_part
-
 
465
	pop	ebx
-
 
466
 
-
 
467
	push	ecx
-
 
468
	mov	ecx,eax
-
 
469
 
-
 
470
	push	esi ebx
-
 
471
	mov	eax,ebx
-
 
472
	sub	ebx,[cur_editor.TopLeft.X] ;! ebx,[left_col]
-
 
473
	cmp	ebx,[columns.scr]
-
 
474
	jge	.skip_t
-
 
475
	add	ebx,esi
-
 
476
	jle	.skip_t
-
 
477
	mov	ebx,[esp+8+4*2] ;// 4*2=esi+ebx
-
 
478
	sub	eax,[cur_editor.TopLeft.X] ;! eax,[left_col]
-
 
479
	jge	.qqq
-
 
480
	sub	edx,eax
-
 
481
	add	esi,eax
-
 
482
;       mov     eax,OLEFT*65536
-
 
483
	xor	eax,eax
-
 
484
	jmp	.qqq2
-
 
485
  .qqq:
-
 
486
;       inc     eax
-
 
487
	imul	eax,6*65536
-
 
488
  .qqq2:
-
 
489
	and	ebx,0x0000FFFF
-
 
490
	add	eax,[left_ofs-2];OLEFT*65536
-
 
491
	add	ebx,eax
-
 
492
 
-
 
493
	mov	eax,[esp]   ; ebx
-
 
494
	add	eax,[esp+4] ; esi
-
 
495
	sub	eax,[cur_editor.TopLeft.X] ;! eax,[left_col]
-
 
496
	sub	eax,[columns.scr]
-
 
497
	jle	.qweqwe
-
 
498
	sub	esi,eax
-
 
499
  .qweqwe:
-
 
500
 
-
 
501
	mov	al,[in_sel]
-
 
502
	cmp	al,0
-
 
503
	je	.draw_t
-
 
504
	dec	al
-
 
505
	jz	.ya4
-
 
506
  .nt1: dec	al
-
 
507
	jnz	.nt2
-
 
508
	mov	eax,[esp]
-
 
509
	cmp	eax,[sel.begin.x]
-
 
510
	jge	.ya4
-
 
511
	add	eax,[esp+4]
-
 
512
	cmp	eax,[sel.begin.x]
-
 
513
	jl	.draw_t
-
 
514
;---[ selection crosses block from the right ]-(-
-
 
515
  .ya1: mov	eax,esi
-
 
516
	mov	esi,[sel.begin.x]
-
 
517
	sub	esi,[esp]
-
 
518
	pushad
-
 
519
	mov	ecx,[cur_editor.TopLeft.X] ;! ecx,[left_col]
-
 
520
	sub	ecx,[esp+4*8]
-
 
521
	jle	@f
-
 
522
	sub	esi,ecx
-
 
523
	sub	[esp+4],ecx
-
 
524
    @@: sub	eax,esi
-
 
525
	add	edx,esi
-
 
526
	imul	esi,6
-
 
527
	rol	ebx,16
-
 
528
	add	bx,si
-
 
529
	rol	ebx,16
-
 
530
	mov	esi,eax
-
 
531
	mov	ecx,[color_tbl+4*6]
-
 
532
	mcall	4
-
 
533
	popad
-
 
534
	jmp	.draw_t
-
 
535
;----------------------------------------------)-
-
 
536
  .nt2: dec	al
-
 
537
	jnz	.nt3
-
 
538
	mov	eax,[esp]
-
 
539
	cmp	eax,[sel.end.x]
-
 
540
	jge	.draw_t
-
 
541
	add	eax,[esp+4]
-
 
542
	cmp	eax,[sel.end.x]
-
 
543
	jl	.ya4
-
 
544
;---[ selection crosses block from the left ]--(-
-
 
545
  .ya2: mov	eax,[sel.end.x]
-
 
546
	sub	eax,[esp]
-
 
547
	push	ebx
-
 
548
	mov	ebx,[esp+4]
-
 
549
	sub	ebx,[cur_editor.TopLeft.X] ;! ebx,[left_col]
-
 
550
	jge	.ya2.1
-
 
551
	add	eax,ebx
-
 
552
  .ya2.1:
-
 
553
	pop	ebx
-
 
554
	pushad
-
 
555
	mov	esi,eax
-
 
556
	mov	ecx,[color_tbl+4*6]
-
 
557
	mcall	4
-
 
558
	popad
-
 
559
	sub	esi,eax
-
 
560
	add	edx,eax
-
 
561
	imul	eax,6*65536
-
 
562
	add	ebx,eax
-
 
563
	jmp	.draw_t
-
 
564
;----------------------------------------------)-
-
 
565
  .nt3: mov	eax,[esp]
-
 
566
	cmp	eax,[sel.end.x]
-
 
567
	jge	.draw_t
-
 
568
	cmp	eax,[sel.begin.x]
-
 
569
	jge	@f
-
 
570
	add	eax,[esp+4]
-
 
571
	cmp	eax,[sel.begin.x]
-
 
572
	jl	.draw_t
-
 
573
	cmp	eax,[sel.end.x]
-
 
574
	jl	.ya1
-
 
575
;---[ selection inside block ]-----------------(-
-
 
576
	mov	eax,esi
-
 
577
	mov	esi,[sel.begin.x]
-
 
578
	sub	esi,[esp]
-
 
579
	push	eax
-
 
580
	mov	eax,[esp+4]
-
 
581
	sub	eax,[cur_editor.TopLeft.X] ;! eax,[left_col]
-
 
582
	jge	.nt3.1
-
 
583
	add	esi,eax
-
 
584
  .nt3.1:
-
 
585
	pop	eax
-
 
586
	sub	eax,esi
-
 
587
	pushad
-
 
588
	add	edx,esi
-
 
589
	imul	esi,6*65536
-
 
590
	add	ebx,esi
-
 
591
	mov	esi,[sel.end.x]
-
 
592
	sub	esi,[sel.begin.x]
-
 
593
	mov	ecx,[color_tbl+4*6]
-
 
594
	sub	eax,esi
-
 
595
	push	eax
-
 
596
	mcall	4
-
 
597
	add	edx,esi
-
 
598
	imul	esi,6*65536
-
 
599
	add	ebx,esi
-
 
600
	pop	esi
-
 
601
	mov	ecx,[esp+4*6]
-
 
602
	mcall	4
-
 
603
	popad
-
 
604
	jmp	.draw_t
-
 
605
;----------------------------------------------)-
-
 
606
    @@: add	eax,esi
-
 
607
	dec	eax
-
 
608
	cmp	eax,[sel.end.x]
-
 
609
	jge	.ya2
-
 
610
;---[ block inside selection ]-----------------(-
-
 
611
  .ya4: mov	ecx,[color_tbl+4*6]
-
 
612
;----------------------------------------------)-
-
 
613
 
-
 
614
  .draw_t:
-
 
615
	mcall	4;[esp+8]
-
 
616
  .skip_t:
-
 
617
	pop	eax eax ; ebx esi
-
 
618
	imul	eax,6
-
 
619
	add	[esp+4*2+2],ax
-
 
620
	pop	ecx esi
-
 
621
	cmp	ecx,[cur_line_len];LINE_WIDTH
-
 
622
	jl	.next_block
-
 
623
 
-
 
624
	pop	ebx ecx
-
 
625
	and	ebx,0x0000FFFF
-
 
626
	add	ebx,[left_ofs-2]
-
 
627
	add	ebx,LINEH
-
 
628
	add	esi,[cur_line_len];LINE_WIDTH
-
 
629
	inc	dword[esp]
-
 
630
	dec	ecx
-
 
631
	jg	.next_line
-
 
632
 
-
 
633
;------------------------------------------------
-
 
634
  .draw_cursor:
-
 
635
 
-
 
636
;------------------------------------------------
-
 
637
	mov	ebx,[left_ofs]
-
 
638
	cmp	ebx,2+LCHGW
-
 
639
	je	.no_gutter
-
 
640
	add	esp,-4*8*2
-
 
641
	sub	ebx,3+LCHGW
-
 
642
	mov	ecx,[top_ofs]
-
 
643
	dec	ecx
-
 
644
	shl	ecx,16
-
 
645
	add	ecx,[bot_ofs]
-
 
646
	sub	ecx,[top_ofs]
-
 
647
	sub	ecx,SCRLW
-
 
648
	mcall	13,,,[cl_3d_normal]
-
 
649
 
-
 
650
	push	bx
-
 
651
	shl	ebx,16
-
 
652
	pop	bx
-
 
653
	add	ecx,[top_ofs]
-
 
654
	dec	ecx
-
 
655
	mcall	38,,,[cl_3d_inset]
-
 
656
 
-
 
657
	mov	ebx,[left_ofs]
-
 
658
	add	ebx,-3-LCHGW
-
 
659
	shl	ebx,16
-
 
660
	add	ebx,[top_ofs]
-
 
661
	mov	edi,[sc.work_text]
-
 
662
	mov	ecx,[cur_editor.TopLeft.Y] ;! ecx,[top_line]
-
 
663
	inc	ecx
-
 
664
	mov	edx,p_info+100
-
 
665
    @@: pushad
-
 
666
	push	eax edx edi
-
 
667
	mov	eax,ecx
-
 
668
	mov	ecx,10
-
 
669
	mov	edi,edx
-
 
670
	call	uint2str
-
 
671
	mov	esi,edi
-
 
672
	pop	edi edx eax
-
 
673
	sub	esi,edx
-
 
674
	imul	eax,esi,6*65536
-
 
675
	sub	ebx,eax
-
 
676
	mcall	4,,edi
-
 
677
	popad
-
 
678
	add	ebx,LINEH
-
 
679
	inc	ecx
-
 
680
	cmp	ecx,[cur_editor.Lines] ;! ecx,[lines]
-
 
681
	jg	@f
-
 
682
	mov	esi,ecx
-
 
683
	sub	esi,[cur_editor.TopLeft.Y] ;! esi,[top_line]
-
 
684
	cmp	esi,[lines.scr]
-
 
685
	jbe	@b
-
 
686
    @@: add	esp,4*8*2
-
 
687
 
-
 
688
  .no_gutter:
-
 
689
;------------------------------------------------
-
 
690
 
-
 
691
	mov	ebx,[draw_blines]
-
 
692
	or	ebx,ebx
-
 
693
	js	@f
-
 
694
	imul	ebx,LINEH
-
 
695
	mov	ecx,[esp-8]
-
 
696
	shl	ecx,16
-
 
697
	mov	cx,bx
-
 
698
	mov	ebx,[p_info.client_box.width]
-
 
699
	add	ebx,[left_ofs-2]
-
 
700
	sub	ebx,[left_ofs]
-
 
701
	add	ebx,-1*65536-SCRLW+1 ; 
-
 
702
	mcall	13,,,[color_tbl+4*5]
-
 
703
    @@:
-
 
704
 
-
 
705
	add	esp,4
-
 
706
	cmp	[bot_mode],0
-
 
707
	jne	@f
-
 
708
	mov	ebx,[cur_editor.Caret.X] ;! ebx,[pos.x]
-
 
709
	sub	ebx,[cur_editor.TopLeft.X] ;! ebx,[left_col]
-
 
710
	js	@f
-
 
711
	cmp	ebx,[columns.scr]
-
 
712
	ja	@f
-
 
713
	imul	ebx,6
-
 
714
	add	ebx,[left_ofs]
-
 
715
	dec	ebx
-
 
716
	push	bx
-
 
717
	shl	ebx,16
-
 
718
	pop	bx
-
 
719
	mov	eax,[cur_editor.Caret.Y] ;! eax,[pos.y]
-
 
720
	sub	eax,[cur_editor.TopLeft.Y] ;! eax,[top_line]
-
 
721
	js	@f
-
 
722
	cmp	eax,[lines.scr]
-
 
723
	jge	@f
-
 
724
	imul	eax,LINEH
-
 
725
	add	eax,[top_ofs]
-
 
726
;       inc     eax
-
 
727
	mov	esi,eax
-
 
728
	shl	esi,16
-
 
729
	add	eax,LINEH-2
-
 
730
	mov	si,ax
-
 
731
	mov	ecx,2
-
 
732
	cmp	[ins_mode],0
-
 
733
	jne	.lp8
-
 
734
	add	cl,4
-
 
735
  .lp8: push	ecx
-
 
736
	mcall	38,,esi,0x01000000
-
 
737
	add	ebx,0x00010001
-
 
738
	pop	ecx
-
 
739
	loop	.lp8
-
 
740
    @@:
-
 
741
;------------------------------------------------
-
 
742
	cmp	[do_not_draw],2
-
 
743
	je	.exit
-
 
744
 
-
 
745
;        mov     ebx,[p_info.x_size]
-
 
746
;        shl     ebx,16
-
 
747
;        add     ebx,(-SCRLW-5+2)*65536+SCRLW-2
-
 
748
;        mov     ecx,[top_ofs-2]
-
 
749
;        mov     cx,SCRLW-1
-
 
750
;        mcall   8,,,'UP',[sc.work_button]
-
 
751
;!!!!!!!!!!!!!!!!!!
-
 
752
	mov	ebx,[p_info.client_box.width]
-
 
753
	shl	ebx,16
-
 
754
	add	ebx,(-SCRLW)*65536+SCRLW
-
 
755
	mov	ecx,[top_ofs-2]
-
 
756
	mov	cx,SCRLW
-
 
757
	sub	ecx,0x00020000
-
 
758
	mcall	8,,,'UP' or 0x40000000
-
 
759
	pushad
-
 
760
	sar	ebx,16
-
 
761
	sar	ecx,16
-
 
762
	push	ebx ecx SCRLW SCRLW
-
 
763
	call	draw_3d_panel
-
 
764
	popad
-
 
765
	mov	eax,8
-
 
766
;!!!!!!!!!!!!!!!!!!
-
 
767
 
-
 
768
	pushad
-
 
769
	push	0x18
-
 
770
	shr	ecx,16
-
 
771
	mov	bx,cx
-
 
772
	add	ebx,(SCRLW/2-2)*65536+SCRLW/2-3
-
 
773
	mcall	4,,[sc.work_text],esp,1
-
 
774
	add	esp,4
-
 
775
	popad
-
 
776
 
-
 
777
;        mov     ecx,[bot_ofs]
-
 
778
;        shl     ecx,16
-
 
779
;        add     ecx,(-SCRLW*2-1)*65536+SCRLW-1
-
 
780
;        mcall   ,,,'DN'
-
 
781
;!!!!!!!!!!!!!!!!!!
-
 
782
	mov	ecx,[bot_ofs]
-
 
783
	shl	ecx,16
-
 
784
	add	ecx,(-SCRLW*2-1)*65536+SCRLW
-
 
785
	mcall	,,,'DN' or 0x40000000
-
 
786
	pushad
-
 
787
	sar	ebx,16
-
 
788
	sar	ecx,16
-
 
789
	push	ebx ecx SCRLW SCRLW
-
 
790
	call	draw_3d_panel
-
 
791
	popad
-
 
792
	mov	eax,8
-
 
793
;!!!!!!!!!!!!!!!!!!
-
 
794
 
-
 
795
	pushad
-
 
796
	push	0x19
-
 
797
	shr	ecx,16
-
 
798
	mov	bx,cx
-
 
799
	add	ebx,(SCRLW/2-2)*65536+SCRLW/2-3
-
 
800
	mcall	4,,[sc.work_text],esp,1
-
 
801
	add	esp,4
-
 
802
	popad
-
 
803
;        sub     ebx,1*65536-2
-
 
804
 
-
 
805
	push	ebx
-
 
806
	mov	eax,[cur_editor.Lines] ;! eax,[lines]
-
 
807
	mov	ebx,[lines.scr]
-
 
808
	mov	ecx,[cur_editor.TopLeft.Y] ;! ecx,[top_line]
-
 
809
	mov	edx,[bot_ofs]
-
 
810
	sub	edx,[top_ofs]
-
 
811
	add	edx,-SCRLW*3+1
-
 
812
	call	get_scroll_vars
-
 
813
	mov	[cur_editor.VScroll.Top],eax ;! [vscrl_top],eax
-
 
814
	mov	[cur_editor.VScroll.Size],ebx ;! [vscrl_size],ebx
-
 
815
	pop	ebx
-
 
816
 
-
 
817
	mov	ecx,eax
-
 
818
	add	ecx,[top_ofs]
-
 
819
	add	ecx,SCRLW-1
-
 
820
;        shl     ecx,16
-
 
821
;        mov     cx,word[vscrl_size]
-
 
822
 
-
 
823
;       mcall   13,,,[sc.work_button]
-
 
824
;!!!!!!!!!!!!!!!!!!
-
 
825
	pushad
-
 
826
	sar	ebx,16
-
 
827
;        rol     ecx,16
-
 
828
;        movsx   eax,cx
-
 
829
;        sar     ecx,16
-
 
830
	push	ebx ecx SCRLW [cur_editor.VScroll.Size] ;! ebx ecx SCRLW [vscrl_size]
-
 
831
	dec	dword[esp]
-
 
832
	call	draw_3d_panel
-
 
833
	popad
-
 
834
	mov	eax,13
-
 
835
;!!!!!!!!!!!!!!!!!!
-
 
836
	inc	ebx
-
 
837
 
-
 
838
	mov	ecx,[top_ofs-2]
-
 
839
	mov	cx,word[cur_editor.VScroll.Top] ;! cx,word[vscrl_top]
-
 
840
	add	ecx,(SCRLW-1)*65536
-
 
841
	mov	edx,[sc.work];[color_tbl+4*5]
-
 
842
	or	cx,cx
-
 
843
	jle	@f
-
 
844
	mcall	13
-
 
845
    @@:
-
 
846
	mov	ecx,[top_ofs]
-
 
847
	add	ecx,[cur_editor.VScroll.Top] ;! ecx,[vscrl_top]
-
 
848
	add	ecx,[cur_editor.VScroll.Size] ;! ecx,[vscrl_size]
-
 
849
	add	ecx,SCRLW-1
-
 
850
	mov	di,cx
-
 
851
	shl	ecx,16
-
 
852
	mov	cx,word[bot_ofs]
-
 
853
	sub	cx,di
-
 
854
	sub	cx,SCRLW*2+1
-
 
855
	jle	@f
-
 
856
	mcall
-
 
857
    @@:
-
 
858
;-----------------------
-
 
859
;        mov     eax,ebx
-
 
860
;        shr     eax,16
-
 
861
;        add     bx,ax
-
 
862
;        mov     ecx,[top_ofs-2]
-
 
863
;        mov     cx,word[top_ofs]
-
 
864
;        add     ecx,SCRLW*65536+SCRLW
-
 
865
;        mcall   38,,,[sc.work_graph];[sc.work_text]
-
 
866
;        mov     ecx,[bot_ofs-2]
-
 
867
;        mov     cx,word[bot_ofs]
-
 
868
;        sub     ecx,(SCRLW*2+2)*65536+(SCRLW*2+2)
-
 
869
;        mcall
-
 
870
	rol	ebx,16
-
 
871
	push	bx
-
 
872
	rol	ebx,16
-
 
873
	pop	bx
-
 
874
	mov	ecx,[top_ofs-2]
-
 
875
	mov	cx,word[bot_ofs]
-
 
876
	add	ecx,(SCRLW-1)*65536-SCRLW*2-2
-
 
877
	mcall	38,,,[cl_3d_inset]
-
 
878
;------------------------------------------------
-
 
879
;        mov     ebx,5*65536+SCRLW-1
-
 
880
;        mov     ecx,[bot_ofs]
-
 
881
;        shl     ecx,16
-
 
882
;        add     ecx,(-SCRLW)*65536+SCRLW-2
-
 
883
;        mcall   8,,,'LT',[sc.work_button]
-
 
884
;!!!!!!!!!!!!!!!!!!
-
 
885
	mov	ebx,SCRLW
-
 
886
	mov	ecx,[bot_ofs]
-
 
887
	shl	ecx,16
-
 
888
	add	ecx,(-SCRLW-1)*65536+SCRLW
-
 
889
	mcall	8,,,'LT' or 0x40000000
-
 
890
	pushad
-
 
891
	sar	ebx,16
-
 
892
	sar	ecx,16
-
 
893
	push	ebx ecx SCRLW SCRLW
-
 
894
	call	draw_3d_panel
-
 
895
	popad
-
 
896
;!!!!!!!!!!!!!!!!!!
-
 
897
 
-
 
898
	pushad
-
 
899
	push	0x1B
-
 
900
	shr	ecx,16
-
 
901
	mov	bx,cx
-
 
902
	add	ebx,(SCRLW/2-2)*65536+SCRLW/2-3
-
 
903
	mcall	4,,[sc.work_text],esp,1
-
 
904
	add	esp,4
-
 
905
	popad
-
 
906
 
-
 
907
;        mov     ebx,[p_info.x_size]
-
 
908
;        shl     ebx,16
-
 
909
;        add     ebx,(-SCRLW*2-5)*65536+SCRLW
-
 
910
;        mcall   ,,,'RT'
-
 
911
;!!!!!!!!!!!!!!!!!!
-
 
912
	mov	ebx,[p_info.client_box.width]
-
 
913
	shl	ebx,16
-
 
914
	add	ebx,(-SCRLW*2)*65536+SCRLW
-
 
915
	mcall	8,,,'RT' or 0x40000000
-
 
916
	pushad
-
 
917
	sar	ebx,16
-
 
918
	sar	ecx,16
-
 
919
	push	ebx ecx SCRLW SCRLW
-
 
920
	call	draw_3d_panel
-
 
921
	popad
-
 
922
;!!!!!!!!!!!!!!!!!!
-
 
923
 
-
 
924
	pushad
-
 
925
	push	0x1A
-
 
926
	shr	ecx,16
-
 
927
	mov	bx,cx
-
 
928
	add	ebx,(SCRLW/2-2)*65536+SCRLW/2-3
-
 
929
	mcall	4,,[sc.work_text],esp,1
-
 
930
	add	esp,4
-
 
931
	popad
-
 
932
;       inc     ecx
-
 
933
 
-
 
934
	push	ecx
-
 
935
	mov	eax,[cur_editor.Columns] ;! eax,[columns]
-
 
936
	mov	ebx,[columns.scr]
-
 
937
	mov	ecx,[cur_editor.TopLeft.X] ;! ecx,[left_col]
-
 
938
	mov	edx,[p_info.client_box.width]
-
 
939
	add	edx,-(SCRLW*3)
-
 
940
	call	get_scroll_vars
-
 
941
	mov	[cur_editor.HScroll.Top],eax ;! [hscrl_top],eax
-
 
942
	mov	[cur_editor.HScroll.Size],ebx ;! [hscrl_size],ebx
-
 
943
	pop	ecx
-
 
944
 
-
 
945
	mov	ebx,eax
-
 
946
	add	ebx,1+SCRLW
-
 
947
	shl	ebx,16
-
 
948
	mov	bx,word[cur_editor.HScroll.Size] ;! bx,word[hscrl_size]
-
 
949
 
-
 
950
;        mcall   13,,,[sc.work_button]
-
 
951
;!!!!!!!!!!!!!!!!!!
-
 
952
	pushad
-
 
953
	sar	ecx,16
-
 
954
	rol	ebx,16
-
 
955
	movsx	eax,bx
-
 
956
	sar	ebx,16
-
 
957
	dec	ebx
-
 
958
	push	eax ecx ebx SCRLW
-
 
959
	call	draw_3d_panel
-
 
960
	popad
-
 
961
;!!!!!!!!!!!!!!!!!!
-
 
962
 
-
 
963
	mov	ebx,(1+SCRLW)*65536
-
 
964
	mov	bx,word[cur_editor.HScroll.Top] ;! bx,word[hscrl_top]
-
 
965
	mcall	13,,,[sc.work];[color_tbl+4*5]
-
 
966
	mov	ebx,1+SCRLW
-
 
967
	add	ebx,[cur_editor.HScroll.Top] ;! ebx,[hscrl_top]
-
 
968
	add	ebx,[cur_editor.HScroll.Size] ;! ebx,[hscrl_size]
-
 
969
	mov	di,bx
-
 
970
	shl	ebx,16
-
 
971
	mov	bx,word[p_info.client_box.width]
-
 
972
	sub	bx,di
-
 
973
	sub	bx,SCRLW*2
-
 
974
	jle	@f
-
 
975
	mcall
-
 
976
    @@:
-
 
977
;        mov     eax,ebx
-
 
978
;        shr     eax,16
-
 
979
;        add     bx,ax
-
 
980
;        mov     ecx,[bot_ofs-2]
-
 
981
;        mov     cx,word[bot_ofs]
-
 
982
;        sub     ecx,SCRLW*65536+2
-
 
983
;        mcall   38,,,[sc.work_graph];[sc.work_text]
-
 
984
;        mov     ebx,[p_info.x_size-2]
-
 
985
;        mov     bx,word[p_info.x_size]
-
 
986
;        sub     ebx,(SCRLW*2+6)*65536+(SCRLW*2+6)
-
 
987
;        mcall
-
 
988
	mov	ebx,[p_info.client_box.width]
-
 
989
;       add     ebx,5*65536-5
-
 
990
	mov	ecx,[bot_ofs-2]
-
 
991
	mov	cx,word[bot_ofs]
-
 
992
	sub	ecx,(SCRLW+1)*65536+(SCRLW+1)
-
 
993
	mcall	38,,,[cl_3d_inset]
-
 
994
;------------------------------------------------
-
 
995
  .exit:
-
 
996
	popad
-
 
997
	ret
-
 
998
}
-
 
999
endf
-
 
1000
 
-
 
1001
;-----------------------------------------------------------------------------
-
 
1002
func get_next_part ;//////////////////////////////////////////////////////////
-
 
1003
;-----------------------------------------------------------------------------
-
 
1004
; Input:
-
 
1005
;  ECX = current letter
-
 
1006
;  ESI = string
-
 
1007
; Output:
-
 
1008
;  ECX = color
-
 
1009
;  EDX = string
-
 
1010
;  ESI = length
-
 
1011
;-----------------------------------------------------------------------------
-
 
1012
	cmp	[cur_editor.AsmMode],0 ;! [asm_mode],0
-
 
1013
	je	.plain.text
-
 
1014
	xor	ebx,ebx
-
 
1015
	mov	edx,ecx
-
 
1016
	add	esi,ecx
-
 
1017
	mov	edi,symbols
-
 
1018
	mov	al,[esi]
-
 
1019
	cmp	al,';'
-
 
1020
	je	.comment
-
 
1021
	mov	ecx,symbols.size
-
 
1022
	repne	scasb
-
 
1023
	je	.symbol
-
 
1024
	cmp	al,'$'
-
 
1025
	jne	@f
-
 
1026
	mov	edi,symbols
-
 
1027
	mov	al,[esi+1]
-
 
1028
	mov	ecx,symbols.size
-
 
1029
	repne	scasb
-
 
1030
	je	.not_symbol
-
 
1031
	jmp	.number
-
 
1032
    @@: cmp	al,'0'
-
 
1033
	jb	@f
-
 
1034
	cmp	al,'9'
-
 
1035
	jbe	.number
-
 
1036
    @@: cmp	al,"'"
-
 
1037
	je	.string
-
 
1038
	cmp	al,'"'
-
 
1039
	je	.string
-
 
1040
  .not_symbol:
-
 
1041
	inc	ebx
-
 
1042
	inc	edx
-
 
1043
	cmp	edx,[cur_line_len];LINE_WIDTH
-
 
1044
	jge	@f
-
 
1045
	mov	edi,symbols
-
 
1046
	mov	al,[esi+ebx]
-
 
1047
	cmp	al,';'
-
 
1048
	je	@f
-
 
1049
	mov	ecx,symbols.size
-
 
1050
	repne	scasb
-
 
1051
	jne	.not_symbol
-
 
1052
    @@: mov	ecx,edx
-
 
1053
	mov	edx,esi
-
 
1054
	mov	esi,ebx
-
 
1055
	mov	eax,[color_tbl+4*0]
-
 
1056
	ret
-
 
1057
  .symbol:
-
 
1058
	inc	ebx
-
 
1059
	inc	edx
-
 
1060
	cmp	edx,[cur_line_len];LINE_WIDTH
-
 
1061
	jge	@f
-
 
1062
	mov	edi,symbols
-
 
1063
	mov	al,[esi+ebx]
-
 
1064
	mov	ecx,symbols.size
-
 
1065
	repne	scasb
-
 
1066
	je	.symbol
-
 
1067
    @@: mov	ecx,edx
-
 
1068
	mov	edx,esi
-
 
1069
	mov	esi,ebx
-
 
1070
	mov	eax,[color_tbl+4*4]
-
 
1071
	ret
-
 
1072
  .comment:
-
 
1073
	neg	edx
-
 
1074
	add	edx,[cur_line_len];LINE_WIDTH
-
 
1075
	xchg	edx,esi
-
 
1076
	mov	ecx,[cur_line_len];LINE_WIDTH
-
 
1077
	mov	eax,[color_tbl+4*3]
-
 
1078
	ret
-
 
1079
  .number:
-
 
1080
	inc	ebx
-
 
1081
	inc	edx
-
 
1082
	cmp	edx,[cur_line_len];LINE_WIDTH
-
 
1083
	jge	@f
-
 
1084
	mov	edi,symbols
-
 
1085
	mov	al,[esi+ebx]
-
 
1086
	cmp	al,';'
-
 
1087
	je	@f
-
 
1088
	mov	ecx,symbols.size
-
 
1089
	repne	scasb
-
 
1090
	jne	.number
-
 
1091
    @@: mov	ecx,edx
-
 
1092
	mov	edx,esi
-
 
1093
	mov	esi,ebx
-
 
1094
	mov	eax,[color_tbl+4*1]
-
 
1095
	ret
-
 
1096
  .string:
-
 
1097
	inc	ebx
-
 
1098
	inc	edx
-
 
1099
	cmp	edx,[cur_line_len];LINE_WIDTH
-
 
1100
	jge	@f
-
 
1101
	cmp	[esi+ebx],al
-
 
1102
	jne	.string
-
 
1103
	inc	ebx
-
 
1104
	inc	edx
-
 
1105
    @@:
-
 
1106
	mov	ecx,edx
-
 
1107
	mov	edx,esi
-
 
1108
	mov	esi,ebx
-
 
1109
	mov	eax,[color_tbl+4*2]
-
 
1110
	ret
-
 
1111
  .plain.text:
-
 
1112
	mov	edx,[cur_line_len];LINE_WIDTH
-
 
1113
	xchg	edx,esi
-
 
1114
	mov	ecx,[cur_line_len];LINE_WIDTH
-
 
1115
	mov	eax,[color_tbl+4*0]
-
 
1116
	ret
-
 
1117
endf
-
 
1118
 
-
 
1119
;-----------------------------------------------------------------------------
203
;-----------------------------------------------------------------------------
1120
func draw_statusbar ;///// WRITE POSITION ////////////////////////////////////
204
func draw_statusbar ;///// DRAW POSITION, MODIFIED STATE, HINT ///////////////
1121
;-----------------------------------------------------------------------------
205
;-----------------------------------------------------------------------------
1122
	cmp	[do_not_draw],1  ; return if drawing is not permitted
206
	cmp	[do_not_draw],1  ; return if drawing is not permitted
1123
	jae	.exit
207
	jae	.exit
Line 1131... Line 215...
1131
;       mcall   9,p_info,-1
215
;       mcall   9,p_info,-1
Line 1132... Line 216...
1132
 
216
 
1133
	mov	ecx,[p_info.client_box.height-2]
217
	mov	ecx,[p_info.client_box.height-2]
1134
	mov	cx,word[p_info.client_box.height]
218
	mov	cx,word[p_info.client_box.height]
1135
	sub	ecx,STATH*65536
-
 
1136
;        mpack   ebx,6*13,6*13
-
 
1137
;        add     ebx,[left_ofs-2]
-
 
1138
;        add     ebx,[left_ofs]
219
	sub	ecx,STATH*65536
Line 1139... Line 220...
1139
	mcall	38,<6*13,6*13>,,[cl_3d_inset]
220
	mcall	38,<6*13,6*13>,,[cl_3d_inset]
1140
 
221
 
1141
	pushad
-
 
1142
	add	ecx,1*65536
-
 
1143
;       sub     ebx,(6*13+1)*65536-1
222
	pushad
1144
;       sub     ebx,[left_ofs]
223
	add	ecx,1*65536
1145
	mov	cx,STATH
224
	mov	cx,STATH
1146
	mcall	13,<0,6*13>,,[cl_3d_normal]
225
	mcall	13,<0,6*13>,,[cl_3d_normal]
1147
	mcall	,<6*13+1,6*(s_modified.size+2)-1>
226
	mcall	,<6*13+1,6*(s_modified.size+2)-1>
Line 1155... Line 234...
1155
	mcall
234
	mcall
Line 1156... Line 235...
1156
 
235
 
1157
	and	ecx,0x0000FFFF
236
	and	ecx,0x0000FFFF
Line 1158... Line 237...
1158
	push	ecx
237
	push	ecx
1159
 
238
 
1160
	mov	eax,[cur_editor.Caret.Y] ;! eax,[pos.y]
239
	mov	eax,[cur_editor.Caret.Y]
1161
	inc	eax
240
	inc	eax
1162
	mov	ecx,10
241
	mov	ecx,10
1163
	mov	edi,p_info+0x100;htext2.pos1
242
	mov	edi,p_info+0x100
1164
	cld
243
	cld
1165
	call	uint2str
244
	call	uint2str
1166
	mov	al,','
245
	mov	al,','
1167
	stosb
246
	stosb
1168
	mov	eax,[cur_editor.Caret.X] ;! eax,[pos.x]
247
	mov	eax,[cur_editor.Caret.X]
Line 1169... Line 248...
1169
	inc	eax
248
	inc	eax
Line 1170... Line 249...
1170
	call	uint2str
249
	call	uint2str
1171
 
250
 
1172
	pop	ebx
251
	pop	ebx
Line 1173... Line -...
1173
 
-
 
1174
	lea	esi,[edi-p_info-0x100]
252
 
1175
	lea	edi,[esi*3]
253
	lea	esi,[edi-p_info-0x100]
1176
	shl	edi,16
254
	lea	edi,[esi*3]
Line 1177... Line 255...
1177
 
255
	shl	edi,16
1178
;       add     ebx,[left_ofs-2]
256
 
1179
	add	ebx,(1+6*6+3)*65536-STATH/2-3
257
	add	ebx,(1+6*6+3)*65536-STATH/2-3
1180
	sub	ebx,edi
-
 
1181
	mcall	4,,[sc.work_text],p_info+0x100
258
	sub	ebx,edi
1182
 
259
	mcall	4,,[sc.work_text],p_info+0x100
Line 1183... Line 260...
1183
	cmp	[cur_editor.Modified],0 ;! [modified],0
260
 
1184
	je	@f
261
	cmp	[cur_editor.Modified],0
Line 1198... Line 275...
1198
 
275
 
1199
  .exit:
276
  .exit:
1200
	ret
277
	ret
Line -... Line 278...
-
 
278
endf
-
 
279
 
-
 
280
func draw_fillrect ; ebx,ecx,edx
-
 
281
	; ebx = 
-
 
282
	; ecx = 
-
 
283
	push	ebx ecx edx
-
 
284
	call	draw_framerect
-
 
285
	add	ebx,1*65536-2
-
 
286
	add	ecx,1*65536-2
-
 
287
	mcall	13,,,esi
-
 
288
	pop	edx ecx ebx
-
 
289
	ret
1201
endf
290
endf
-
 
291
 
-
 
292
func draw_framerect ; ebx,ecx,edx
1202
 
293
	; ebx = 
1203
func draw_framerect ; ebx,ecx,edx
-
 
1204
	push	ebx ecx
-
 
1205
	; x1 = esp+6
-
 
1206
	; x2 = esp+4 (width)
-
 
Line 1207... Line 294...
1207
	; y1 = esp+2
294
	; ecx = 
1208
	; y2 = esp+0 (height)
295
	push	ebx ecx
1209
 
296
 
1210
	add	bx,[esp+6]
297
	add	bx,[esp+6]	 ; ebx = 
1211
	mov	cx,[esp+2]
298
	mov	cx,[esp+2]	 ; ecx = 
1212
	dec	ebx
299
	dec	ebx
1213
	mcall	38
300
	mcall	38
1214
	add	cx,[esp]
301
	add	cx,[esp]	 ; ecx = 
1215
	rol	ecx,16
302
	rol	ecx,16
Line 1216... Line 303...
1216
	add	cx,[esp]
303
	add	cx,[esp]	 ; ecx = 
1217
	sub	ecx,0x00010001
304
	sub	ecx,0x00010001
1218
	mcall
305
	mcall
1219
 
306
 
1220
	mov	ebx,[esp+4]
307
	mov	ebx,[esp+4]	 ; ebx = 
1221
	mov	ecx,[esp]
308
	mov	ecx,[esp]	 ; ecx = 
1222
	mov	bx,[esp+6]
309
	mov	bx,[esp+6]	 ; ebx = 
1223
	add	cx,[esp+2]
310
	add	cx,[esp+2]
Line 1240... Line 327...
1240
	add	ebx,0x00010000
327
	add	ebx,0x00010000
1241
	push	cx
328
	push	cx
1242
	shl	ecx,16
329
	shl	ecx,16
1243
	pop	cx
330
	pop	cx
1244
	add	ecx,0x00020001
331
	add	ecx,0x00020001
1245
 
-
 
1246
;       add     ecx,0x00040003
-
 
1247
;       sub     ebx,0x000A000B
-
 
1248
	mcall	38
332
	mcall	38
1249
	add	ecx,0x00010001
333
	add	ecx,0x00010001
1250
	mcall
334
	mcall
1251
	add	ebx,4
335
	add	ebx,4
1252
	sub	ecx,2
336
	sub	ecx,2