Subversion Repositories Kolibri OS

Rev

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

Rev 7514 Rev 7524
Line 8... Line 8...
8
include '../../../KOSfuncs.inc'
8
include '../../../KOSfuncs.inc'
9
include '../../../load_img.inc'
9
include '../../../load_img.inc'
10
include '../../../develop/libraries/box_lib/load_lib.mac'
10
include '../../../develop/libraries/box_lib/load_lib.mac'
Line 11... Line 11...
11
 
11
 
12
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
12
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
Line 13... Line 13...
13
hed db 'Life 31.10.18',0 ;¯®¤¯¨áì ®ª­ 
13
hed db 'Life 03.11.18',0 ;¯®¤¯¨áì ®ª­ 
14
 
14
 
Line 15... Line 15...
15
run_file_70 FileInfoBlock
15
run_file_70 FileInfoBlock
Line 148... Line 148...
148
		stosd ;for(i=0;i
148
		stosd ;for(i=0;i
149
		inc eax
149
		inc eax
150
		loop @b
150
		loop @b
151
	ret
151
	ret
152
endp
152
endp
-
 
153
 
153
align 4
154
align 4
154
proc pole_cell_creat, x:dword, y:dword, li:dword
155
proc pole_cell_creat, x:dword, y:dword, li:dword
155
	pushad ;eax ebx ecx edx edi
156
	pushad ;eax ebx ecx edx edi
Line 156... Line 157...
156
 
157
 
157
	; *** ¥á«¨ ª«¥âª  㦥 ¡ë«  ᮧ¤ ­ 
158
	; *** ¥á«¨ ª«¥âª  㦥 ¡ë«  ᮧ¤ ­ 
158
	stdcall pole_cell_find, [x],[y]
159
	stdcall pole_cell_find, [x],[y]
159
	cmp eax,0
160
	or eax,eax
160
	je @f ;if(i){
161
	jz @f ;if(i){
161
		get_cell_offset ebx,eax
162
		get_cell_offset ebx,eax
162
		cmp dword[li],0
163
		cmp dword[li],0
163
		jne .else_if ;if(!li)
164
		jne .else_if ;if(!li)
164
			; ¥á«¨ ᮧ¤ ¥âáï ¯ãáâ ï ª«¥âª 
165
			; ¥á«¨ ᮧ¤ ¥âáï ¯ãáâ ï ª«¥âª 
165
			inc byte[ebx+13] ;+13 = .so
166
			inc byte[ebx+Cell.so]
166
			jmp .fun_e
167
			jmp .fun_e
167
		.else_if: ;else if(!(cell[i].liv&1) ){
168
		.else_if: ;else if(!(cell[i].liv&1) ){
168
		bt word[ebx+12],0 ;+12 = .liv
169
		bt word[ebx+Cell.liv],0
169
			; ¥á«¨ ᮧ¤ ¥âáï ¦¨¢ ï ª«¥âª 
170
			; ¥á«¨ ᮧ¤ ¥âáï ¦¨¢ ï ª«¥âª 
170
			; ¨ à ­ìè¥ ª«¥âª  ¡ë«  ᮧ¤ ­  ­® ®ª § « áì ¯ãá⮩
171
			; ¨ à ­ìè¥ ª«¥âª  ¡ë«  ᮧ¤ ­  ­® ®ª § « áì ¯ãá⮩
171
			jae .creat_border_cells
172
			jae .creat_border_cells
172
		jmp .fun_e
173
		jmp .fun_e
Line 191... Line 192...
191
	get_cell_offset ebx,[eax]
192
	get_cell_offset ebx,[eax]
Line 192... Line 193...
192
 
193
 
193
	mov ecx,[x]
194
	mov ecx,[x]
194
	mov dword[ebx],ecx ;+0 = .x
195
	mov dword[ebx],ecx ;+0 = .x
195
	mov edx,[y]
196
	mov edx,[y]
196
	mov dword[ebx+4],edx ;+4 = .y
197
	mov dword[ebx+Cell.y],edx
197
	mov eax,[tim]
198
	mov eax,[tim]
198
	mov dword[ebx+8],eax ;+8 = .tc
199
	mov dword[ebx+Cell.tc],eax
Line 199... Line 200...
199
	mov byte[ebx+12],0 ;+12 = .liv
200
	mov byte[ebx+Cell.liv],0
200
 
201
 
201
	cmp dword[li],0
202
	cmp dword[li],0
202
	jne @f
203
	jne @f
203
		mov byte[ebx+13],1 ;+13 = .so
204
		mov byte[ebx+Cell.so],1
204
		jmp .fun_e
205
		jmp .fun_e
Line 205... Line 206...
205
	@@:
206
	@@:
206
	mov byte[ebx+13],0 ;+13 = .so
207
	mov byte[ebx+Cell.so],0
207
 
208
 
208
	.creat_border_cells:
209
	.creat_border_cells:
209
		inc dword[osob]
210
		inc dword[osob]
210
		or byte[ebx+12],1 ;+12 = .liv
211
		or byte[ebx+Cell.liv],1
211
		mov ecx,[x]
212
		mov ecx,[x]
212
		dec ecx
213
		dec ecx
Line 262... Line 263...
262
		;ecx -> firstC
263
		;ecx -> firstC
263
		;edx -> &memCell[i]
264
		;edx -> &memCell[i]
264
		;edi -> cell[memCell[i]]
265
		;edi -> cell[memCell[i]]
265
		mov ecx,[memCell]
266
		mov ecx,[memCell]
266
		mov ebx,[b_sort]
267
		mov ebx,[b_sort]
267
		mov edx,ebx
268
		lea edx,[ebx*4]
268
		shl edx,2
-
 
269
		add edx,ecx
269
		add edx,ecx
270
		mov ecx,[ecx]
270
		mov ecx,[ecx]
271
		.cycle_b: ;for(i=b_sort+1;i<=fristC;i++)
271
		.cycle_b: ;for(i=b_sort+1;i<=fristC;i++)
272
			inc ebx
272
			inc ebx
273
			cmp ebx,ecx
273
			cmp ebx,ecx
Line 276... Line 276...
276
			get_cell_offset edi,[edx]
276
			get_cell_offset edi,[edx]
277
			mov esi,[x]
277
			mov esi,[x]
278
			cmp dword[edi],esi ;+0 = .x
278
			cmp dword[edi],esi ;+0 = .x
279
			jne .if_e
279
			jne .if_e
280
			mov esi,[y]
280
			mov esi,[y]
281
			cmp dword[edi+4],esi ;+4 = .y
281
			cmp dword[edi+Cell.y],esi
282
			jne .if_e
282
			jne .if_e
283
				;if(cell[memCell[i]].x==x && cell[memCell[i]].y==y){
283
				;if(cell[memCell[i]].x==x && cell[memCell[i]].y==y){
284
				mov eax,[edx] ;fnd=memCell[i];
284
				mov eax,[edx] ;fnd=memCell[i];
285
				jmp .cycle_e ;break;
285
				jmp .cycle_e ;break;
286
			.if_e:
286
			.if_e:
Line 314... Line 314...
314
	;ecx -> i
314
	;ecx -> i
315
	;edi -> mas[i]
315
	;edi -> mas[i]
316
	.cycle_b: ;do{
316
	.cycle_b: ;do{
317
		shr ebx,1 ;por>>=1;
317
		shr ebx,1 ;por>>=1;
Line 318... Line 318...
318
 
318
 
319
		mov edi,ecx
-
 
320
		shl edi,2
319
		lea edi,[ecx*4]
321
		add edi,[mas]
320
		add edi,[mas]
322
		;if(compare_cells_mb(mas[i],fx,fy)){
321
		;if(compare_cells_mb(mas[i],fx,fy)){
323
		stdcall pole_compare_cells_mb_coords, dword[edi],[fx],[fy]
322
		stdcall pole_compare_cells_mb_coords, dword[edi],[fx],[fy]
324
		cmp dl,0
323
		cmp dl,0
Line 350... Line 349...
350
 
349
 
351
	pop edi edx ecx ebx
350
	pop edi edx ecx ebx
352
	ret
351
	ret
Line -... Line 352...
-
 
352
endp
-
 
353
 
353
endp
354
;description:
354
 
355
; ¢á¯®¬®£ â¥«ì­ ï äã­ªæ¨ï ¤«ï á®àâ¨à®¢ª¨ ï祥ª¨ ¯® ª®®à¤¨­ â ¬
355
;output:
356
;output:
356
; dl
357
; dl
357
align 4
358
align 4
Line 364... Line 365...
364
	jle @f
365
	jle @f
365
		mov dl,1
366
		mov dl,1
366
		jmp .fun_e
367
		jmp .fun_e
367
	@@:
368
	@@:
368
	mov ecx,[fy]
369
	mov ecx,[fy]
369
	cmp dword[eax+4],ecx
370
	cmp dword[eax+Cell.y],ecx
370
	jle @f
371
	jle @f
371
	cmp dword[eax],ebx
372
	cmp dword[eax],ebx
372
	jne @f
373
	jne @f
373
		mov dl,1
374
		mov dl,1
374
		jmp .fun_e
375
		jmp .fun_e
Line 377... Line 378...
377
	.fun_e:
378
	.fun_e:
378
	pop ecx ebx eax
379
	pop ecx ebx eax
379
	ret
380
	ret
380
endp
381
endp
Line -... Line 382...
-
 
382
 
-
 
383
;description:
381
 
384
; ¢á¯®¬®£ â¥«ì­ ï äã­ªæ¨ï ¤«ï á®àâ¨à®¢ª¨ ï祥ª¨ ¯® ª®®à¤¨­ â ¬
382
;output:
385
;output:
383
; dl
386
; dl
384
align 4
387
align 4
385
proc pole_compare_cells_mb_coords, i0:dword, fx:dword, fy:dword
388
proc pole_compare_cells_mb_coords, i0:dword, fx:dword, fy:dword
Line 391... Line 394...
391
	jge @f
394
	jge @f
392
		mov dl,1
395
		mov dl,1
393
		jmp .fun_e
396
		jmp .fun_e
394
	@@:
397
	@@:
395
	mov ecx,[fy]
398
	mov ecx,[fy]
396
	cmp dword[eax+4],ecx
399
	cmp dword[eax+Cell.y],ecx
397
	jge @f
400
	jge @f
398
	cmp dword[eax],ebx
401
	cmp dword[eax],ebx
399
	jne @f
402
	jne @f
400
		mov dl,1
403
		mov dl,1
401
		jmp .fun_e
404
		jmp .fun_e
Line 418... Line 421...
418
	jle @f ;x0>x1
421
	jle @f ;x0>x1
419
		mov dl,1
422
		mov dl,1
420
		jmp .fun_e
423
		jmp .fun_e
421
	@@:
424
	@@:
422
	jne @f ;x0==x1
425
	jne @f ;x0==x1
423
	mov ecx,[ebx+4] ;+4 = .y
426
	mov ecx,[ebx+Cell.y]
424
	cmp dword[eax+4],ecx
427
	cmp dword[eax+Cell.y],ecx
425
	jle @f ;y0>y1
428
	jle @f ;y0>y1
426
		mov dl,1
429
		mov dl,1
427
		jmp .fun_e
430
		jmp .fun_e
428
	@@:
431
	@@:
429
	xor dl,dl
432
	xor dl,dl
Line 450... Line 453...
450
 
453
 
451
;---
454
;---
452
	@@: ;while(i
455
	@@: ;while(i
453
		cmp ebx,[b_sort]
456
		cmp ebx,[b_sort]
454
		jge @f ;¯¥à¥å®¤¨¬ ­  ­ ç «® ­¨¦­¥£® 横« 
457
		jge @f ;¯¥à¥å®¤¨¬ ­  ­ ç «® ­¨¦­¥£® 横« 
455
		mov ecx,ebx
-
 
456
		shl ecx,2
458
		lea ecx,[ebx*4]
457
		add ecx,[memCell]
459
		add ecx,[memCell]
458
		get_cell_offset ecx,[ecx]
460
		get_cell_offset ecx,[ecx]
459
		mov edx,[ecx] ;+0 = .x
461
		mov edx,[ecx] ;+0 = .x
460
		add edx,[Cor_x]
462
		add edx,[Cor_x]
Line 465... Line 467...
465
	@@:
467
	@@:
Line 466... Line 468...
466
 
468
 
467
	cmp byte[zoom],2
469
	cmp byte[zoom],2
468
	jge .zoom2
470
	jge .zoom2
469
	@@: ;for(;i<=fristC;i++){
471
	@@: ;for(;i<=fristC;i++){
470
		mov ecx,ebx
-
 
471
		shl ecx,2
472
		lea ecx,[ebx*4]
472
		add ecx,[memCell]
473
		add ecx,[memCell]
473
		get_cell_offset ecx,[ecx]
474
		get_cell_offset ecx,[ecx]
474
;...
475
;...
475
		mov edi,[Cor_x]
476
		mov edi,[Cor_x]
476
		add edi,[ecx] ;+0 = .x
477
		add edi,[ecx] ;+0 = .x
477
		mov esi,[Cor_y]
478
		mov esi,[Cor_y]
478
		add esi,[ecx+4] ;+4 = .y
479
		add esi,[ecx+Cell.y]
479
		bt word[ecx+12],0 ;+12 = .liv
480
		bt word[ecx+Cell.liv],0
480
		jc .cell_1
481
		jc .cell_1
481
			;­¥ ¦¨¢ ï ï祩ª 
482
			;­¥ ¦¨¢ ï ï祩ª 
482
			mov edx,[CellColors]
483
			mov edx,[CellColors]
483
			mov edx,[edx]
484
			mov edx,[edx]
484
			jmp .cell_0
485
			jmp .cell_0
485
		.cell_1:
486
		.cell_1:
486
			;¦¨¢ ï ï祩ª 
487
			;¦¨¢ ï ï祩ª 
487
			mov edx,[tim]
488
			mov edx,[tim]
488
			inc edx
489
			inc edx
489
			sub edx,[ecx+8] ;+8 = .tc
490
			sub edx,[ecx+Cell.tc]
490
			cmp edx,COL_MEM
491
			cmp edx,COL_MEM
491
			jle .in_color
492
			jle .in_color
492
				mov edx,COL_MEM
493
				mov edx,COL_MEM
493
			.in_color:
494
			.in_color:
Line 503... Line 504...
503
 
504
 
504
	jmp .no_draw
505
	jmp .no_draw
Line 505... Line 506...
505
	.zoom2:
506
	.zoom2:
506
 
507
 
507
	@@: ;for(;i<=fristC;i++){
-
 
508
		mov ecx,ebx
508
	@@: ;for(;i<=fristC;i++){
509
		shl ecx,2
509
		lea ecx,[ebx*4]
Line 510... Line 510...
510
		add ecx,[memCell]
510
		add ecx,[memCell]
511
		get_cell_offset ecx,[ecx]
511
		get_cell_offset ecx,[ecx]
512
 
512
 
513
		xor edx,edx
513
		xor edx,edx
514
		mov dl,byte[zoom] ;edx ¨á¯®«ì§ã¥âáï ¤«ï ¢­¥á¥­¨ï zoom ¢ 4 ¡ ©â­®¥ ç¨á«®
514
		mov dl,byte[zoom] ;edx ¨á¯®«ì§ã¥âáï ¤«ï ¢­¥á¥­¨ï zoom ¢ 4 ¡ ©â­®¥ ç¨á«®
515
		mov edi,[ecx] ;+0 = .x
515
		mov edi,[ecx] ;+0 = .x
516
		add edi,[Cor_x]
516
		add edi,[Cor_x]
517
		imul edi,edx
517
		imul edi,edx
518
		mov esi,[ecx+4] ;+4 = .y
518
		mov esi,[ecx+Cell.y]
519
		add esi,[Cor_y]
519
		add esi,[Cor_y]
520
		imul esi,edx
520
		imul esi,edx
521
		bt word[ecx+12],0 ;+12 = .liv
521
		bt word[ecx+Cell.liv],0
522
		jc .z2_cell_1
522
		jc .z2_cell_1
523
			;­¥ ¦¨¢ ï ï祩ª 
523
			;­¥ ¦¨¢ ï ï祩ª 
524
			mov edx,[CellColors]
524
			mov edx,[CellColors]
525
			mov edx,[edx]
525
			mov edx,[edx]
526
			jmp .z2_cell_0
526
			jmp .z2_cell_0
527
		.z2_cell_1:
527
		.z2_cell_1:
528
			;¦¨¢ ï ï祩ª 
528
			;¦¨¢ ï ï祩ª 
529
			mov edx,[tim]
529
			mov edx,[tim]
530
			inc edx
530
			inc edx
531
			sub edx,[ecx+8] ;+8 = .tc
531
			sub edx,[ecx+Cell.tc]
532
			cmp edx,COL_MEM
532
			cmp edx,COL_MEM
533
			jle .z2_in_color
533
			jle .z2_in_color
Line 565... Line 565...
565
	inc dword[tim]
565
	inc dword[tim]
566
	mov ebx,1
566
	mov ebx,1
567
	@@: ;for(i=1;i<=firstC;i++)
567
	@@: ;for(i=1;i<=firstC;i++)
568
		add ecx,4
568
		add ecx,4
569
		get_cell_offset edx,[ecx]
569
		get_cell_offset edx,[ecx]
570
		bt word[edx+12],0 ;+12 = .liv
570
		bt word[edx+Cell.liv],0
571
		jae .if_0_e
571
		jae .if_0_e
572
			; á®åà ­¥­¨¥ ï祩ª¨ (á®á¥¤¥© 2 ¨«¨ 3)
572
			; á®åà ­¥­¨¥ ï祩ª¨ (á®á¥¤¥© 2 ¨«¨ 3)
573
			cmp byte[edx+13],2 ;+13 = .so
573
			cmp byte[edx+Cell.so],2
574
			je .if_2_e
574
			je .if_2_e
575
			cmp byte[edx+13],3 ;+13 = .so
575
			cmp byte[edx+Cell.so],3
576
			je .if_2_e
576
			je .if_2_e
577
			jmp .change
577
			jmp .change
578
		.if_0_e:
578
		.if_0_e:
579
			; ᮧ¤ ­¨¥ ï祩ª¨ (á®á¥¤¥© 3)
579
			; ᮧ¤ ­¨¥ ï祩ª¨ (á®á¥¤¥© 3)
580
			cmp byte[edx+13],3 ;+13 = .so
580
			cmp byte[edx+Cell.so],3
581
			jne .if_1_e
581
			jne .if_1_e
582
			.change:
582
			.change:
583
				or byte[edx+12],2 ;+12 = .liv
583
				or byte[edx+Cell.liv],2
584
				jmp .if_2_e
584
				jmp .if_2_e
585
		.if_1_e:
585
		.if_1_e:
586
			; 㤠«¥­¨¥ ¯ãá⮩ ï祩ª¨ ¤«ï ®á¢®¡®¦¤¥­¨ï ¯ ¬ïâ¨
586
			; 㤠«¥­¨¥ ¯ãá⮩ ï祩ª¨ ¤«ï ®á¢®¡®¦¤¥­¨ï ¯ ¬ïâ¨
587
			cmp byte[edx+13],0 ;+13 = .so
587
			cmp byte[edx+Cell.so],0
588
			jne .if_2_e
588
			jne .if_2_e
589
			mov edi,[edx+8] ;+8 = .tc
589
			mov edi,[edx+Cell.tc]
590
			add edi,5 ; 5 - ¢à¥¬ï á®åà ­¥­¨ï ¯ãá⮩ ï祩ª¨, ¤® ¥ñ 㤠«¥­¨ï
590
			add edi,5 ; 5 - ¢à¥¬ï á®åà ­¥­¨ï ¯ãá⮩ ï祩ª¨, ¤® ¥ñ 㤠«¥­¨ï
591
			cmp edi,[tim]
591
			cmp edi,[tim]
592
			jge .if_2_e
592
			jge .if_2_e
593
				mov edi,eax
593
				lea edi,[eax*4]
594
				shl edi,2
-
 
595
				add edi,[memCell] ;edi -> &memCell[fristC]
594
				add edi,[memCell] ;edi -> &memCell[fristC]
596
				mov esi,[edi] ;swp=memCell[fristC];
595
				mov esi,[edi] ;swp=memCell[fristC];
597
				mov edx,[ecx] ;edx - 㦥 ­¥ ¨á¯®«ì§ã¥¬, ¯®â®¬ã ¬®¦¥¬ ¯®àâ¨âì
596
				mov edx,[ecx] ;edx - 㦥 ­¥ ¨á¯®«ì§ã¥¬, ¯®â®¬ã ¬®¦¥¬ ¯®àâ¨âì
598
				mov dword[edi],edx ;memCell[fristC]=memCell[i];
597
				mov dword[edi],edx ;memCell[fristC]=memCell[i];
599
				mov dword[ecx],esi ;memCell[i]=swp;
598
				mov dword[ecx],esi ;memCell[i]=swp;
Line 614... Line 613...
614
	mov ecx,[memCell]
613
	mov ecx,[memCell]
615
	mov ebx,1
614
	mov ebx,1
616
	@@: ;for(i=1;i<=firstC;i++)
615
	@@: ;for(i=1;i<=firstC;i++)
617
		add ecx,4
616
		add ecx,4
618
		get_cell_offset edx,[ecx]
617
		get_cell_offset edx,[ecx]
619
		bt word[edx+12],1 ;+12 = .liv
618
		bt word[edx+Cell.liv],1
620
		jae .no_change
619
		jae .no_change
621
			xor byte[edx+12],3 ;+12 = .liv
620
			xor byte[edx+Cell.liv],3
622
			mov edi,[tim]
621
			mov edi,[tim]
623
			mov dword[edx+8],edi ;+8 = .tc
622
			mov dword[edx+Cell.tc],edi
624
			bt word[edx+12],0 ;+12 = .liv
623
			bt word[edx+Cell.liv],0
625
			jc .new_cell
624
			jc .new_cell
626
				push eax
625
				push eax
627
				mov edi,[edx]
626
				mov edi,[edx]
628
				dec edi
627
				dec edi
629
				mov esi,[edx+4]
628
				mov esi,[edx+Cell.y]
630
				dec esi
629
				dec esi
631
				dec dword[osob]
630
				dec dword[osob]
632
				;¤ «ìè¥ §­ ç¥­¨¥ edx ¯®àâ¨âáï
631
				;¤ «ìè¥ §­ ç¥­¨¥ edx ¯®àâ¨âáï
633
				stdcall pole_cell_find,edi,esi
632
				stdcall pole_cell_find,edi,esi
634
				get_cell_offset edx,eax
633
				get_cell_offset edx,eax
635
				dec byte[edx+13] ;+13 = .so
634
				dec byte[edx+Cell.so]
636
				inc esi
635
				inc esi
637
				stdcall pole_cell_find,edi,esi
636
				stdcall pole_cell_find,edi,esi
638
				get_cell_offset edx,eax
637
				get_cell_offset edx,eax
639
				dec byte[edx+13] ;+13 = .so
638
				dec byte[edx+Cell.so]
640
				inc esi
639
				inc esi
641
				stdcall pole_cell_find,edi,esi
640
				stdcall pole_cell_find,edi,esi
642
				get_cell_offset edx,eax
641
				get_cell_offset edx,eax
643
				dec byte[edx+13] ;+13 = .so
642
				dec byte[edx+Cell.so]
644
				inc edi
643
				inc edi
645
				stdcall pole_cell_find,edi,esi
644
				stdcall pole_cell_find,edi,esi
646
				get_cell_offset edx,eax
645
				get_cell_offset edx,eax
647
				dec byte[edx+13] ;+13 = .so
646
				dec byte[edx+Cell.so]
648
				sub esi,2
647
				sub esi,2
649
				stdcall pole_cell_find,edi,esi
648
				stdcall pole_cell_find,edi,esi
650
				get_cell_offset edx,eax
649
				get_cell_offset edx,eax
651
				dec byte[edx+13] ;+13 = .so
650
				dec byte[edx+Cell.so]
652
				inc edi
651
				inc edi
653
				stdcall pole_cell_find,edi,esi
652
				stdcall pole_cell_find,edi,esi
654
				get_cell_offset edx,eax
653
				get_cell_offset edx,eax
655
				dec byte[edx+13] ;+13 = .so
654
				dec byte[edx+Cell.so]
656
				inc esi
655
				inc esi
657
				stdcall pole_cell_find,edi,esi
656
				stdcall pole_cell_find,edi,esi
658
				get_cell_offset edx,eax
657
				get_cell_offset edx,eax
659
				dec byte[edx+13] ;+13 = .so
658
				dec byte[edx+Cell.so]
660
				inc esi
659
				inc esi
661
				stdcall pole_cell_find,edi,esi
660
				stdcall pole_cell_find,edi,esi
662
				get_cell_offset edx,eax
661
				get_cell_offset edx,eax
663
				dec byte[edx+13] ;+13 = .so
662
				dec byte[edx+Cell.so]
664
				pop eax
663
				pop eax
665
				jmp .no_change
664
				jmp .no_change
666
			.new_cell: ; ¯®ï¢¨« áì ­®¢ ï ï祩ª 
665
			.new_cell: ; ¯®ï¢¨« áì ­®¢ ï ï祩ª 
667
				inc dword[osob]
666
				inc dword[osob]
668
				mov edi,[edx]
667
				mov edi,[edx]
669
				dec edi
668
				dec edi
670
				mov esi,[edx+4]
669
				mov esi,[edx+Cell.y]
671
				dec esi
670
				dec esi
672
				stdcall pole_cell_creat,edi,esi,0
671
				stdcall pole_cell_creat,edi,esi,0
673
				inc esi
672
				inc esi
674
				stdcall pole_cell_creat,edi,esi,0
673
				stdcall pole_cell_creat,edi,esi,0
675
				inc esi
674
				inc esi
Line 708... Line 707...
708
	;‚믮«­¨âì ¯à®æ¥¤ãà㠢ᯫëâ¨ï ”«®©¤  ¤«ï ª ¦¤®£® ¯®¤¤¥à¥¢ 
707
	;‚믮«­¨âì ¯à®æ¥¤ãà㠢ᯫëâ¨ï ”«®©¤  ¤«ï ª ¦¤®£® ¯®¤¤¥à¥¢ 
709
	mov eax,[n]
708
	mov eax,[n]
710
	@@: ;for(i=n; i>=2; i--){
709
	@@: ;for(i=n; i>=2; i--){
711
		stdcall pole_fl_surface, ecx,1,eax ;(a,1,i)
710
		stdcall pole_fl_surface, ecx,1,eax ;(a,1,i)
712
		;®¬¥áâ¨âì ­ ©¤¥­­ë© ¬ ªá¨¬ «ì­ë© í«¥¬¥­â ¢ ª®­¥æ ᯨ᪠
711
		;®¬¥áâ¨âì ­ ©¤¥­­ë© ¬ ªá¨¬ «ì­ë© í«¥¬¥­â ¢ ª®­¥æ ᯨ᪠
713
		mov edi,eax
712
		lea edi,[eax*4]
714
		shl edi,2
-
 
715
		add edi,ecx ;edi -> &a[i]
713
		add edi,ecx ;edi -> &a[i]
716
		mov esi,[edi] ;w=a[i];
714
		mov esi,[edi] ;w=a[i];
717
		mov edx,[ecx+4]
715
		mov edx,[ecx+4]
718
		mov dword[edi],edx ;a[i]=a[1];
716
		mov dword[edi],edx ;a[i]=a[1];
719
		mov dword[ecx+4],esi ;a[1]=w;
717
		mov dword[ecx+4],esi ;a[1]=w;
Line 737... Line 735...
737
	;esi -> j
735
	;esi -> j
738
	mov eax,[a]
736
	mov eax,[a]
739
	mov ebx,[i]
737
	mov ebx,[i]
740
	mov ecx,[k]
738
	mov ecx,[k]
Line 741... Line 739...
741
 
739
 
742
	mov edx,ebx
-
 
743
	shl edx,2
740
	lea edx,[ebx*4]
744
	add edx,eax
741
	add edx,eax
745
	mov edx,[edx]
742
	mov edx,[edx]
746
	mov dword[copy],edx ;copy=a[i];
743
	mov dword[copy],edx ;copy=a[i];
747
	mov edi,ebx
744
	mov edi,ebx
Line 751... Line 748...
751
		jg .cycle_e
748
		jg .cycle_e
752
		jne @f ;if (m==k) j=m;
749
		jne @f ;if (m==k) j=m;
753
			mov esi,edi
750
			mov esi,edi
754
			jmp .else_e
751
			jmp .else_e
755
		@@: ;else if (pole_compare_cells_bm(a[m],a[m+1])) j=m;
752
		@@: ;else if (pole_compare_cells_bm(a[m],a[m+1])) j=m;
756
		mov edx,edi
753
		lea edx,[edi*4]
757
		shl edx,2
-
 
758
		add edx,eax
754
		add edx,eax
759
		stdcall pole_compare_cells_bm, dword[edx],dword[edx+4]
755
		stdcall pole_compare_cells_bm, dword[edx],dword[edx+4]
760
		cmp dl,0
756
		cmp dl,0
761
		je @f
757
		je @f
762
			mov esi,edi
758
			mov esi,edi
Line 765... Line 761...
765
			mov esi,edi
761
			mov esi,edi
766
			inc esi
762
			inc esi
767
		.else_e:
763
		.else_e:
Line 768... Line 764...
768
 
764
 
769
		;if (pole_compare_cells_bm(a[j],copy)) {
765
		;if (pole_compare_cells_bm(a[j],copy)) {
770
		mov edx,esi
-
 
771
		shl edx,2
766
		lea edx,[esi*4]
772
		add edx,eax
767
		add edx,eax
773
		stdcall pole_compare_cells_bm, dword[edx],dword[copy]
768
		stdcall pole_compare_cells_bm, dword[edx],dword[copy]
774
		cmp dl,0
769
		cmp dl,0
Line 775... Line 770...
775
		je .cycle_e ;} else break; //¢ë室 ¨§ 横« 
770
		je .cycle_e ;} else break; //¢ë室 ¨§ 横« 
776
 
-
 
777
		mov edx,esi
771
 
778
		shl edx,2
772
		lea edx,[esi*4]
779
		add edx,eax
773
		add edx,eax
780
		push dword[edx] ;push a[j];
-
 
781
		mov edx,ebx
774
		push dword[edx] ;push a[j];
782
		shl edx,2
775
		lea edx,[ebx*4]
783
		add edx,eax
776
		add edx,eax
784
		pop dword[edx] ;a[i]=a[j];
777
		pop dword[edx] ;a[i]=a[j];
785
		mov ebx,esi ;i=j;
778
		mov ebx,esi ;i=j;
Line 803... Line 796...
803
 
796
 
804
align 4
797
align 4
805
start:
798
start:
806
	load_libraries l_libs_start,l_libs_end
799
	load_libraries l_libs_start,l_libs_end
807
	;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ­ è  «¨¡ 
800
	;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ­ è  «¨¡ 
808
	mov	ebp,lib_7
801
	mov	ebp,lib2
809
	cmp	dword [ebp+ll_struc_size-4],0
802
	cmp	dword [ebp+ll_struc_size-4],0
810
	jz	@f
803
	jz	@f
811
		mcall SF_TERMINATE_PROCESS ;exit not correct
804
		mcall SF_TERMINATE_PROCESS ;exit not correct
812
	@@:
805
	@@:
Line 827... Line 820...
827
	;­ áâனª  梥⮢ ï祥ª
820
	;­ áâனª  梥⮢ ï祥ª
828
	stdcall pole_init_colors, 0xffffd0,0xff0000,0x0000ff
821
	stdcall pole_init_colors, 0xffffd0,0xff0000,0x0000ff
829
	call pole_clear
822
	call pole_clear
830
	call pole_paint ;à¨á®¢ ­¨¥ ¯®«ï ¢ ¡ãä¥à¥ (­¥ ­  íªà ­¥)
823
	call pole_paint ;à¨á®¢ ­¨¥ ¯®«ï ¢ ¡ãä¥à¥ (­¥ ­  íªà ­¥)
Line 831... Line -...
831
 
-
 
832
	;xor eax,eax
-
 
833
	;mov edi,txt_zoom.zi
-
 
834
	;mov al,byte[zoom]
-
 
835
	;call tl_convert_to_str
-
 
836
 
824
 
837
	mcall SF_SYSTEM_GET,SSF_TIME_COUNT
825
	mcall SF_SYSTEM_GET,SSF_TIME_COUNT
Line 838... Line 826...
838
	mov [last_time],eax
826
	mov [last_time],eax
839
 
827
 
Line 859... Line 847...
859
	jz red_win
847
	jz red_win
860
	cmp al,2
848
	cmp al,2
861
	jz key
849
	jz key
862
	cmp al,3
850
	cmp al,3
863
	jz button
851
	jz button
-
 
852
	cmp al,6
-
 
853
	jne @f
-
 
854
		mcall SF_THREAD_INFO,procinfo,-1
-
 
855
		cmp ax,word[procinfo.window_stack_position]
-
 
856
		jne @f ;®ª­® ­¥  ªâ¨¢­®
-
 
857
		call mouse
864
 
858
	@@:
865
	jmp still
859
	jmp still
Line 866... Line 860...
866
 
860
 
-
 
861
align 4
-
 
862
mouse:
-
 
863
	push eax ebx ecx
-
 
864
	mcall SF_MOUSE_GET,SSF_BUTTON_EXT
-
 
865
	bt eax,8
-
 
866
	jnc @f
-
 
867
		;mouse l. but. press
-
 
868
		;call mouse_left_d
-
 
869
		;jmp .end_l
-
 
870
	@@:
-
 
871
	bt eax,16
-
 
872
	jnc .end_l
-
 
873
		;mouse l. but. up
-
 
874
		;call mouse_left_u
-
 
875
		;jmp .end_l
-
 
876
	.end_l:
-
 
877
 
-
 
878
	call buf_get_mouse_coord
-
 
879
	cmp eax,-1
-
 
880
	je .end0
-
 
881
		shl eax,1
-
 
882
		sub eax,[buf_0.w]
-
 
883
		sar eax,1
-
 
884
		;mov [mouse_prop_x],eax
-
 
885
		shl ebx,1
-
 
886
		sub ebx,[buf_0.h]
-
 
887
		sar ebx,1
-
 
888
		;mov [mouse_prop_y],ebx
-
 
889
 
-
 
890
		mcall SF_MOUSE_GET,SSF_SCROLL_DATA
-
 
891
		test ax,ax
-
 
892
		jz .end0
-
 
893
 
-
 
894
		test ax,0x8000
-
 
895
		jnz .decr
-
 
896
			;㢥«¨ç¥­¨¥ ¬ áèâ ¡ 
-
 
897
			call but_zoom_p
-
 
898
			jmp .end0
-
 
899
		.decr:
-
 
900
			;㬥­ì襭¨¥ ¬ áèâ ¡ 
-
 
901
			call but_zoom_m
-
 
902
	.end0:
-
 
903
 
-
 
904
	pop ecx ebx eax
-
 
905
	ret
-
 
906
 
-
 
907
;output:
-
 
908
; eax - buffer coord X (¥á«¨ ªãàá®à §  ¡ãä¥à®¬ -1)
-
 
909
; ebx - buffer coord Y (¥á«¨ ªãàá®à §  ¡ãä¥à®¬ -1)
-
 
910
align 4
-
 
911
proc buf_get_mouse_coord
-
 
912
	mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
-
 
913
	cmp ax,word[buf_0.t]
-
 
914
	jl .no_buf ;­¥ ¯®¯ «¨ ¢ ®ª­® ¡ãä¥à  ¯® ®á¨ y
-
 
915
	mov ebx,eax
-
 
916
	shr ebx,16
-
 
917
	cmp bx,word[buf_0.l]
-
 
918
	jl .no_buf ;­¥ ¯®¯ «¨ ¢ ®ª­® ¡ãä¥à  ¯® ®á¨ x
-
 
919
 
-
 
920
	and eax,0xffff ;®áâ ¢«ï¥¬ ª®®à¤¨­ âã y
-
 
921
	sub ax,word[buf_0.t]
-
 
922
	cmp eax,[buf_0.h]
-
 
923
	jg .no_buf
-
 
924
	sub bx,word[buf_0.l]
-
 
925
	cmp ebx,[buf_0.w]
-
 
926
	jg .no_buf
-
 
927
	xchg eax,ebx
-
 
928
	jmp .end_f
-
 
929
	.no_buf:
-
 
930
		xor eax,eax
-
 
931
		not eax
-
 
932
		xor ebx,ebx
-
 
933
		not ebx
-
 
934
	.end_f:
-
 
935
	ret
-
 
936
endp
-
 
937
 
867
align 4
938
align 4
868
timer_funct:
939
timer_funct:
869
	pushad
940
	pushad
870
	mcall SF_SYSTEM_GET,SSF_TIME_COUNT
941
	mcall SF_SYSTEM_GET,SSF_TIME_COUNT
Line 898... Line 969...
898
	mov edx,[sc.work]
969
	mov edx,[sc.work]
899
	or  edx,0x33000000
970
	or  edx,0x33000000
900
	mov edi,hed
971
	mov edi,hed
901
	mcall SF_CREATE_WINDOW,(20 shl 16)+485,(20 shl 16)+415
972
	mcall SF_CREATE_WINDOW,(20 shl 16)+485,(20 shl 16)+415
Line -... Line 973...
-
 
973
 
-
 
974
	mcall SF_THREAD_INFO,procinfo,-1
-
 
975
	mov eax,[procinfo.box.height]
-
 
976
	cmp eax,120
-
 
977
	jge @f
-
 
978
		mov eax,120 ;min size
-
 
979
	@@:
-
 
980
	sub eax,63
-
 
981
	mov ebx,[procinfo.box.width]
-
 
982
	cmp ebx,270
-
 
983
	jge @f
-
 
984
		mov ebx,270
-
 
985
	@@:
-
 
986
	sub ebx,9
-
 
987
	cmp eax,[buf_0.h] ;ᬮâਬ à §¬¥à ¡ãä¥à 
-
 
988
	jne @f
-
 
989
	cmp ebx,[buf_0.w]
-
 
990
	jne @f
-
 
991
		jmp .end0
-
 
992
	@@:
-
 
993
		stdcall [buf2d_resize], buf_0, ebx,eax,1
-
 
994
		stdcall [buf2d_clear], buf_0, [buf_0.color]
-
 
995
		call pole_paint
-
 
996
	.end0:
902
 
997
 
Line 903... Line 998...
903
	mcall SF_DEFINE_BUTTON,(5 shl 16)+20,(5 shl 16)+20,3, [sc.work_button]
998
	mcall SF_DEFINE_BUTTON,(5 shl 16)+20,(5 shl 16)+20,3, [sc.work_button]
904
 
999
 
905
	mov ebx,(30 shl 16)+20
1000
	mov ebx,(30 shl 16)+20
Line 1002... Line 1097...
1002
	add bx,9
1097
	add bx,9
1003
	mov edx,txt_osob
1098
	mov edx,txt_osob
1004
	int 0x40
1099
	int 0x40
Line 1005... Line 1100...
1005
 
1100
 
1006
	mov eax,SF_DRAW_NUMBER
-
 
1007
	xor ecx,ecx
1101
	mov eax,SF_DRAW_NUMBER
1008
	mov cl,byte[zoom]
1102
	movzx ecx,byte[zoom]
1009
	mov ebx,(2 shl 16)
1103
	mov ebx,(2 shl 16)
1010
	mov edx,(325+6*9)*65536+5
1104
	mov edx,(325+6*9)*65536+5
1011
	mov esi,[sc.work_button_text]
1105
	mov esi,[sc.work_button_text]
1012
	or  esi,(1 shl 30)
1106
	or  esi,(1 shl 30)
Line 1179... Line 1273...
1179
	;edx - ª®­¥æ ä ©« 
1273
	;edx - ª®­¥æ ä ©« 
1180
	mov edi,[open_file_lif]
1274
	mov edi,[open_file_lif]
1181
	xor ebx,ebx
1275
	xor ebx,ebx
1182
	xor ecx,ecx
1276
	xor ecx,ecx
1183
	mov eax,ebx
1277
	mov eax,ebx
1184
	mov edx,[open_file_lif]
1278
	mov edx,edi
1185
	add edx,[open_file_size]
1279
	add edx,[open_file_size]
1186
	@@:
1280
	@@:
1187
		cmp byte[edi],'*'
1281
		cmp byte[edi],'*'
1188
		jne .no_cell
1282
		jne .no_cell
1189
			stdcall pole_cell_creat, ebx,ecx,1
1283
			stdcall pole_cell_creat, ebx,ecx,1
Line 1301... Line 1395...
1301
		div ecx
1395
		div ecx
1302
		sub ebx,eax
1396
		sub ebx,eax
1303
		sub dword[Cor_y],ebx ;ᤢ¨£ ¥¬ ¯®«¥ §à¥­¨ï ¯® ®á¨ y
1397
		sub dword[Cor_y],ebx ;ᤢ¨£ ¥¬ ¯®«¥ §à¥­¨ï ¯® ®á¨ y
Line 1304... Line 1398...
1304
 
1398
 
1305
		inc byte[zoom]
-
 
1306
		;xor eax,eax
-
 
1307
		;mov edi,txt_zoom.zi
-
 
1308
		;mov al,byte[zoom]
-
 
1309
		;call tl_convert_to_str
1399
		inc byte[zoom]
1310
		call draw_pok
1400
		call draw_pok
Line 1311... Line 1401...
1311
		popad
1401
		popad
1312
 
1402
 
Line 1353... Line 1443...
1353
		div ecx
1443
		div ecx
1354
		sub ebx,eax
1444
		sub ebx,eax
1355
		sub dword[Cor_y],ebx ;ᤢ¨£ ¥¬ ¯®«¥ §à¥­¨ï ¯® ®á¨ y
1445
		sub dword[Cor_y],ebx ;ᤢ¨£ ¥¬ ¯®«¥ §à¥­¨ï ¯® ®á¨ y
Line 1356... Line 1446...
1356
 
1446
 
1357
		dec byte[zoom]
-
 
1358
		;xor eax,eax
-
 
1359
		;mov edi,txt_zoom.zi
-
 
1360
		;mov al,byte[zoom]
-
 
1361
		;call tl_convert_to_str
1447
		dec byte[zoom]
1362
		call draw_pok
1448
		call draw_pok
Line 1363... Line 1449...
1363
		popad
1449
		popad
1364
 
1450
 
Line 1578... Line 1664...
1578
system_dir_1 db '/sys/lib/'
1664
system_dir_1 db '/sys/lib/'
1579
lib_name_1 db 'libimg.obj',0
1665
lib_name_1 db 'libimg.obj',0
1580
err_message_found_lib_1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,0
1666
err_message_found_lib_1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,0
1581
err_message_import_1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
1667
err_message_import_1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
Line 1582... Line 1668...
1582
 
1668
 
1583
system_dir_7 db '/sys/lib/'
1669
system_dir_2 db '/sys/lib/'
1584
lib_name_7 db 'buf2d.obj',0
1670
lib_name_2 db 'buf2d.obj',0
1585
err_msg_found_lib_7 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'buf2d.obj',39,0
1671
err_msg_found_lib_2 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'buf2d.obj',39,0
Line 1586... Line 1672...
1586
err_msg_import_7 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,0
1672
err_msg_import_2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,0
1587
 
1673
 
1588
l_libs_start:
1674
l_libs_start:
1589
	lib0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
1675
	lib0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
1590
		err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
1676
		err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
1591
	lib1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
1677
	lib1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
1592
		err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
1678
		err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
1593
	lib_7 l_libs lib_name_7, sys_path, library_path, system_dir_7,\
1679
	lib2 l_libs lib_name_2, sys_path, library_path, system_dir_2,\
Line 1594... Line 1680...
1594
		err_msg_found_lib_7,head_f_l,import_buf2d,err_msg_import_7,head_f_i
1680
		err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
1595
l_libs_end:
1681
l_libs_end:
1596
 
1682
 
Line 1651... Line 1737...
1651
 
1737
 
1652
align 4
1738
align 4
1653
import_buf2d:
1739
import_buf2d:
1654
	init dd sz_init
1740
	init dd sz_init
1655
	buf2d_create dd sz_buf2d_create
-
 
1656
	buf2d_create_f_img dd sz_buf2d_create_f_img
1741
	buf2d_create dd sz_buf2d_create
1657
	buf2d_clear dd sz_buf2d_clear
1742
	buf2d_clear dd sz_buf2d_clear
1658
	buf2d_draw dd sz_buf2d_draw
1743
	buf2d_draw dd sz_buf2d_draw
1659
	buf2d_delete dd sz_buf2d_delete
1744
	buf2d_delete dd sz_buf2d_delete
1660
	buf2d_line dd sz_buf2d_line
-
 
1661
	buf2d_rect_by_size dd sz_buf2d_rect_by_size
1745
	buf2d_resize dd sz_buf2d_resize
1662
	buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
-
 
1663
	buf2d_circle dd sz_buf2d_circle
-
 
1664
	buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
-
 
1665
	buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
-
 
1666
	buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
-
 
1667
	buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
-
 
1668
	buf2d_bit_blt dd sz_buf2d_bit_blt
-
 
1669
	buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
-
 
1670
	buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
-
 
1671
	buf2d_curve_bezier dd sz_buf2d_curve_bezier
-
 
1672
	buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
-
 
1673
	buf2d_draw_text dd sz_buf2d_draw_text
-
 
1674
	buf2d_crop_color dd sz_buf2d_crop_color
-
 
1675
	buf2d_offset_h dd sz_buf2d_offset_h
-
 
1676
	buf2d_flood_fill dd sz_buf2d_flood_fill
1746
	buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
1677
	buf2d_set_pixel dd sz_buf2d_set_pixel
1747
	buf2d_set_pixel dd sz_buf2d_set_pixel
1678
	dd 0,0
1748
	dd 0,0
1679
	sz_init db 'lib_init',0
1749
	sz_init db 'lib_init',0
1680
	sz_buf2d_create db 'buf2d_create',0
-
 
1681
	sz_buf2d_create_f_img db 'buf2d_create_f_img',0
1750
	sz_buf2d_create db 'buf2d_create',0
1682
	sz_buf2d_clear db 'buf2d_clear',0
1751
	sz_buf2d_clear db 'buf2d_clear',0
1683
	sz_buf2d_draw db 'buf2d_draw',0
1752
	sz_buf2d_draw db 'buf2d_draw',0
1684
	sz_buf2d_delete db 'buf2d_delete',0
1753
	sz_buf2d_delete db 'buf2d_delete',0
1685
	sz_buf2d_line db 'buf2d_line',0
-
 
1686
	sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
1754
	sz_buf2d_resize db 'buf2d_resize',0
1687
	sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
-
 
1688
	sz_buf2d_circle db 'buf2d_circle',0
-
 
1689
	sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
-
 
1690
	sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
-
 
1691
	sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
-
 
1692
	sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
-
 
1693
	sz_buf2d_bit_blt db 'buf2d_bit_blt',0
-
 
1694
	sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
-
 
1695
	sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
-
 
1696
	sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
-
 
1697
	sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
-
 
1698
	sz_buf2d_draw_text db 'buf2d_draw_text',0
-
 
1699
	sz_buf2d_crop_color db 'buf2d_crop_color',0
-
 
1700
	sz_buf2d_offset_h db 'buf2d_offset_h',0
-
 
1701
	sz_buf2d_flood_fill db 'buf2d_flood_fill',0
1755
	sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
Line 1702... Line 1756...
1702
	sz_buf2d_set_pixel db 'buf2d_set_pixel',0
1756
	sz_buf2d_set_pixel db 'buf2d_set_pixel',0
1703
 
1757
 
1704
mouse_dd dd 0x0
1758
mouse_dd dd 0
Line 1705... Line 1759...
1705
sc system_colors 
1759
sc system_colors 
1706
last_time dd 0
1760
last_time dd 0
Line 1707... Line 1761...
1707
 
1761
 
1708
align 16
1762
align 16
1709
procinfo process_information 
1763
procinfo process_information 
1710
 
1764
 
1711
align 4
1765
align 4
1712
buf_0: dd 0 ;a? § a?«i ­  ?aa?a ?§®?a ¦?­?i
1766
buf_0: dd 0
1713
	dw 5 ;+4 left
1767
.l: dw 0 ;+4 left
1714
	dw 35 ;+6 top
1768
.t: dw 35 ;+6 top
Line 1715... Line -...
1715
.w: dd 460 ;+8 w
-
 
1716
.h: dd 340 ;+12 h
-
 
1717
.color: dd 0xffffd0 ;+16 color
-
 
1718
	db 24 ;+20 bit in pixel
-
 
1719
 
-
 
1720
;íâ®â ª®¤ ­¥ ¬®©, ®­ ¯à¥®¡à §ã¥â ç¨á«® ¢ áâபã
-
 
1721
;input:
-
 
1722
; eax = value
-
 
1723
; edi = string buffer
-
 
1724
;output:
-
 
1725
align 4
-
 
1726
tl_convert_to_str:
-
 
1727
	pushad
-
 
1728
		mov dword[edi+1],0
-
 
1729
		call .str
-
 
1730
	popad
-
 
1731
	ret
-
 
1732
 
-
 
1733
align 4
-
 
1734
.str:
-
 
1735
	mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬  áç¨á«¥­¨ï ¨§¬¥­ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤­ë¥ ¯ à ¬¥âàë eax - ç¨á«®
-
 
1736
    ;¯à¥à¥¢®¤ ç¨á«  ¢ ASCII áâப㠢§®¤­ë¥ ¤ ­­ë¥ ecx=á¨á⥬  áç¨á«¥­ï edi  ¤à¥á ªã¤  § ¯¨á뢠âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®­¥æ ¯¥à¥¬¥­­®© 
-
 
1737
	cmp eax,ecx  ;áà ¢­¨âì ¥á«¨ ¢ eax ¬¥­ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ ­  @@-1 â.¥. ­  pop eax
-
 
1738
	jb @f
-
 
1739
		xor edx,edx  ;®ç¨áâ¨âì edx
-
 
1740
		div ecx      ;à §¤¥«¨âì - ®áâ â®ª ¢ edx
-
 
1741
		push edx     ;¯®«®¦¨âì ¢ á⥪
-
 
1742
		;dec edi             ;ᬥ饭¨¥ ­¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®­æ  áâப¨
-
 
1743
		call .str ;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx
-
 
1744
		pop eax
-
 
1745
	@@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï))
1769
.w: dd 476 ;+8 w
1746
	or al,0x30  ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥  祬 ¤¢¥ ¢ëè¥
1770
.h: dd 352 ;+12 h
1747
	stosb	    ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi
1771
.color: dd 0xffffd0 ;+16 color
1748
	ret	      ;¢¥à­ãâìáï ç¥­ì ¨­â¥à¥á­ë© 室 â.ª. ¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
1772
	db 24 ;+20 bit in pixel
1749
 
1773