Subversion Repositories Kolibri OS

Rev

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

Rev 1776 Rev 6619
Line 93... Line 93...
93
	and	 edx,ebx	; if *all* of them are negative a sign flag is raised
93
	and	 edx,ebx	; if *all* of them are negative a sign flag is raised
94
	and	 edx,ecx
94
	and	 edx,ecx
95
	and	 edx,eax
95
	and	 edx,eax
96
	test	 edx,80008000h	; Check both X&Y at once
96
	test	 edx,80008000h	; Check both X&Y at once
97
	jne	 .tt_loop2_end
97
	jne	 .tt_loop2_end
98
	cmp	 ax,SIZE_Y
98
    ;    cmp      ax,SIZE_Y
99
	jl	 @f
99
    ;    jl       @f
100
	cmp	 bx,SIZE_Y
100
    ;    cmp      bx,SIZE_Y
101
	jl	 @f
101
    ;    jl       @f
102
	cmp	 cx,SIZE_Y
102
    ;    cmp      cx,SIZE_Y
103
	jl	 @f
103
    ;    jl       @f
104
	ror	 eax,16
104
	ror	 eax,16
105
	ror	 ebx,16
105
	ror	 ebx,16
106
	ror	 ecx,16
106
	ror	 ecx,16
107
	cmp	 ax,SIZE_X
107
    ;    cmp      ax,SIZE_X
108
	jl	 @f
108
    ;    jl       @f
109
	cmp	 bx,SIZE_X
109
    ;    cmp      bx,SIZE_X
110
	jl	 @f
110
    ;    jl       @f
111
	cmp	 cx,SIZE_X
111
    ;    cmp      cx,SIZE_X
112
	jl	 @f
112
    ;    jl       @f
113
	jmp	 .tt_loop2_end
113
    ;    jmp      .tt_loop2_end
114
     @@:
114
     @@:
115
	mov	 eax,dword[.tex_x1] ; texture coords must be in [0..TEX_X(Y)]
115
	mov	 eax,dword[.tex_x1] ; texture coords must be in [0..TEX_X(Y)]
116
	mov	 ebx,dword[.tex_x2]
116
	mov	 ebx,dword[.tex_x2]
117
	mov	 ecx,dword[.tex_x3]
117
	mov	 ecx,dword[.tex_x3]
118
	mov	 edx,eax
118
	mov	 edx,eax
Line 438... Line 438...
438
	mov	ebp,esp
438
	mov	ebp,esp
Line 439... Line 439...
439
 
439
 
440
	mov	ax,.y
440
	mov	ax,.y
441
	or	ax,ax
441
	or	ax,ax
-
 
442
	jl	.tl_quit
-
 
443
	mov	bx,[size_y_var]
442
	jl	.tl_quit
444
	dec	bx
443
	cmp	ax,SIZE_Y
445
	cmp	ax,bx  ;SIZE_Y
Line 444... Line 446...
444
	jge	.tl_quit
446
	jge	.tl_quit
445
 
447
 
446
	mov	ax,.x1
448
	mov	ax,.x1
Line 470... Line 472...
470
	mov	eax,.z1
472
	mov	eax,.z1
471
	xchg	eax,.z2
473
	xchg	eax,.z2
472
	mov	.z1,eax
474
	mov	.z1,eax
Line 473... Line 475...
473
 
475
 
-
 
476
     .tl_ok:
-
 
477
	mov	cx,[size_x_var]
474
     .tl_ok:
478
	dec	cx
475
	cmp	.x1,SIZE_X
479
	cmp	.x1,cx	 ;SIZE_X
476
	jge	.tl_quit
480
	jge	.tl_quit
477
	cmp	.x2,0
481
	cmp	.x2,0
Line 478... Line 482...
478
	jle	.tl_quit
482
	jle	.tl_quit
Line 515... Line 519...
515
	mov	eax,.tex_dx
519
	mov	eax,.tex_dx
516
	imul	ebx
520
	imul	ebx
517
	add	dword[.tex_x1],eax
521
	add	dword[.tex_x1],eax
Line 518... Line 522...
518
 
522
 
519
      @@:
523
      @@:
520
	cmp	.x2,SIZE_X
524
	cmp	.x2,cx ;SIZE_X
521
	jl	@f
525
	jl	@f
522
	mov	.x2,SIZE_X
526
	mov	.x2,cx	;SIZE_X
Line 523... Line 527...
523
      @@:
527
      @@:
524
 
528
 
525
	movsx	ebx,.y	      ; calc mem begin in buffers
529
	movsx	ebx,.y	      ; calc mem begin in buffers
526
	mov	eax,SIZE_X
530
	movzx	eax,word[size_x_var]  ;SIZE_X
527
	mul	ebx
531
	mul	ebx
528
	movsx	ebx,.x1
532
	movsx	ebx,.x1