Subversion Repositories Kolibri OS

Rev

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

Rev 1245 Rev 1776
Line 708... Line 708...
708
;--------------in: eax - x1
708
;--------------in: eax - x1
709
;--------------    ebx - x2
709
;--------------    ebx - x2
710
;--------------    edi - pointer to screen buffer
710
;--------------    edi - pointer to screen buffer
711
;stack - another parameters :
711
;stack - another parameters :
712
.y	equ dword [ebp+4]
712
.y	equ dword [ebp+4]
713
.bx1q	equ	  [ebp+8]
-
 
714
.bx2q	equ	  [ebp+16]
-
 
715
.ex1q	equ	  [ebp+24]
-
 
716
.ex2q	equ	  [ebp+32]
-
 
717
.bx1	equ dword [ebp+8]   ;   ---
713
.bx1	equ	  [ebp+8]   ;   ---
718
.by1	equ dword [ebp+12]  ;       |
714
.by1	equ dword [ebp+12]  ;       |
719
.bx2	equ dword [ebp+16]  ;       |
715
.bx2	equ	  [ebp+16]  ;       |
720
.by2	equ dword [ebp+20]  ;       |>   bump and env coords
716
.by2	equ dword [ebp+20]  ;       |>   bump and env coords
721
.ex1	equ dword [ebp+24]  ;       |>   shifted shl ROUND
717
.ex1	equ	  [ebp+24]  ;       |>   shifted shl ROUND
722
.ey1	equ dword [ebp+28]  ;       |
718
.ey1	equ dword [ebp+28]  ;       |
723
.ex2	equ dword [ebp+32]  ;       |
719
.ex2	equ	  [ebp+32]  ;       |
724
.ey2	equ dword [ebp+36]  ;   ---
720
.ey2	equ dword [ebp+36]  ;   ---
725
;.bx1q   equ qword [ebp+8]   ; - new
-
 
726
;.ex1q   equ qword [ebp+24]  ; - new
-
 
727
.bmap	equ dword [ebp+40]
721
.bmap	equ dword [ebp+40]
728
.emap	equ dword [ebp+44]
722
.emap	equ dword [ebp+44]
729
.z_buff equ dword [ebp+48]
723
.z_buff equ dword [ebp+48]
730
.z2	equ dword [ebp+52]  ;   -- |>   z coords shifted
724
.z2	equ dword [ebp+52]  ;   -- |>   z coords shifted
731
.z1	equ dword [ebp+56]  ;   --       shl  CATMULL_SHIFT
725
.z1	equ dword [ebp+56]  ;   --       shl  CATMULL_SHIFT
Line 732... Line 726...
732
 
726
 
733
.x1	equ dword [ebp-4]
727
.x1	equ dword [ebp-4]
734
.x2	equ dword [ebp-8]
728
.x2	equ dword [ebp-8]
735
.dbx	equ dword [ebp-12]
729
.dbx	equ dword [ebp-12]
736
.dby	equ dword [ebp-16]
-
 
737
.dbyq	equ qword [ebp-16]  ; - new
730
.dby	equ	  [ebp-16]
738
.dex	equ dword [ebp-20]
731
.dex	equ dword [ebp-20]
739
.dey	equ dword [ebp-24]
-
 
740
.deyq	equ qword [ebp-24]  ; - new
732
.dey	equ	  [ebp-24]
741
.dz	equ dword [ebp-28]
733
.dz	equ dword [ebp-28]
742
.cbx	equ dword [ebp-32]
734
.cbx	equ dword [ebp-32]
743
.cby	equ dword [ebp-36]
-
 
744
.cbyq	equ qword [ebp-36]  ; - new
735
.cby	equ	  [ebp-36]
745
.cex	equ dword [ebp-40]
736
.cex	equ dword [ebp-40]
746
.cey	equ dword [ebp-44]
-
 
747
.ceyq	equ qword [ebp-44]  ; - new
737
.cey	equ	  [ebp-44]
748
.cz	equ dword [ebp-48]
738
.cz	equ dword [ebp-48]
749
.czbuff equ dword [ebp-52]
739
.czbuff equ dword [ebp-52]
750
.temp1	equ	   ebp-60
740
.temp1	equ	   ebp-60
751
.temp2	equ	   ebp-68
741
.temp2	equ	   ebp-68
Line 780... Line 770...
780
	mov	edx,.ey1
770
	mov	edx,.ey1
781
	xchg	edx,.ey2
771
	xchg	edx,.ey2
782
	mov	.ey1,edx
772
	mov	.ey1,edx
783
else
773
else
Line 784... Line 774...
784
 
774
 
785
	movq	mm0,.bx1q
775
	movq	mm0,.bx1
786
	movq	mm1,.ex1q
776
	movq	mm1,.ex1
787
	movq	mm2,.bx2q
777
	movq	mm2,.bx2
788
	movq	mm3,.ex2q
778
	movq	mm3,.ex2
789
	movq	.bx2q,mm0
779
	movq	.bx2,mm0
790
	movq	.ex2q,mm1
780
	movq	.ex2,mm1
791
	movq	.bx1q,mm2
781
	movq	.bx1,mm2
Line 792... Line 782...
792
	movq	.ex1q,mm3
782
	movq	.ex1,mm3
Line 793... Line 783...
793
 
783
 
794
end if
784
end if
Line 814... Line 804...
814
 
804
 
815
       sub	 esp,16
805
       sub	 esp,16
816
       cvtsi2ss  xmm3,ebx	     ;rcps
806
       cvtsi2ss  xmm3,ebx	     ;rcps
Line 817... Line 807...
817
       shufps	 xmm3,xmm3,0
807
       shufps	 xmm3,xmm3,0
818
 
808
 
819
       cvtpi2ps  xmm0,.bx1q ;mm0
809
       cvtpi2ps  xmm0,.bx1 ;mm0
820
       movlhps	 xmm0,xmm0
810
       movlhps	 xmm0,xmm0
821
       cvtpi2ps  xmm0,.ex1q ;mm2
811
       cvtpi2ps  xmm0,.ex1 ;mm2
822
       cvtpi2ps  xmm1,.bx2q ;mm1
812
       cvtpi2ps  xmm1,.bx2 ;mm1
823
       movlhps	 xmm1,xmm1
813
       movlhps	 xmm1,xmm1
Line 824... Line 814...
824
       cvtpi2ps  xmm1,.ex2q ;mm3
814
       cvtpi2ps  xmm1,.ex2 ;mm3
Line 825... Line 815...
825
       subps	 xmm1,xmm0
815
       subps	 xmm1,xmm0
826
 
816
 
827
       divps	 xmm1,xmm3
817
       divps	 xmm1,xmm3
828
 
818
 
829
       shufps	 xmm1,xmm1,10110001b
819
       shufps	 xmm1,xmm1,10110001b
830
       cvtps2pi  mm0,xmm1	   ; mm0 -> 2 delta dwords
820
       cvtps2pi  mm0,xmm1	   ; mm0 -> 2 delta dwords
Line 831... Line 821...
831
       movhlps	 xmm1,xmm1
821
       movhlps	 xmm1,xmm1
Line 832... Line 822...
832
       cvtps2pi  mm1,xmm1
822
       cvtps2pi  mm1,xmm1
833
       movq	 .deyq,mm0
823
       movq	 .dey,mm0
Line 909... Line 899...
909
	add	esi,ebx
899
	add	esi,ebx
Line 910... Line 900...
910
 
900
 
911
	mov	ecx,.x2
901
	mov	ecx,.x2
912
	sub	ecx,.x1
902
	sub	ecx,.x1
913
	; init current variables
903
	; init current variables
914
	push	.bx1
904
	push	dword .bx1
915
	push	.by1
905
	push	.by1
916
	push	.ex1
906
	push	dword .ex1
Line 917... Line 907...
917
	push	.ey1
907
	push	.ey1
918
 
908
 
919
	push	.z1		 ; current z shl CATMULL_SHIFT
909
	push	.z1		 ; current z shl CATMULL_SHIFT
Line 1070... Line 1060...
1070
     .skip:
1060
     .skip:
1071
	add	edi,3
1061
	add	edi,3
1072
     .no_skip:
1062
     .no_skip:
1073
	add	.czbuff,4
1063
	add	.czbuff,4
1074
;;   if Ext = NON
1064
;;   if Ext = NON
-
 
1065
if Ext >= MMX
-
 
1066
	movq	mm0,.cby
-
 
1067
	movq	mm1,.cey
-
 
1068
	paddd	mm0,.dby
-
 
1069
	paddd	mm1,.dey
-
 
1070
	movq	.cby,mm0
-
 
1071
	movq	.cey,mm1
-
 
1072
else
1075
	mov	eax,.dbx
1073
	mov	eax,.dbx
1076
	add	.cbx,eax
1074
	add	.cbx,eax
1077
	mov	eax,.dby
1075
	mov	eax,.dby
1078
	add	.cby,eax
1076
	add	.cby,eax
1079
	mov	eax,.dex
1077
	mov	eax,.dex
1080
	add	.cex,eax
1078
	add	.cex,eax
1081
	mov	eax,.dey
1079
	mov	eax,.dey
1082
	add	.cey,eax
1080
	add	.cey,eax
-
 
1081
end if
1083
;;    else
1082
;;    else
1084
;;        paddd   mm0,mm2
1083
;;        paddd   mm0,mm2
1085
;;        paddd   mm1,mm3
1084
;;        paddd   mm1,mm3
1086
;;    end if
1085
;;    end if
1087
	mov	eax,.dz
1086
	mov	eax,.dz