Subversion Repositories Kolibri OS

Rev

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

Rev 8014 Rev 8047
Line 74... Line 74...
74
   jg      .skip
74
   jg      .skip
75
   movzx   edx,word[size_x_var]
75
   movzx   edx,word[size_x_var]
76
   mul     edx
76
   mul     edx
77
;   shl     eax,9
77
;   shl     eax,9
78
   add     eax,dword .x
78
   add     eax,dword .x
-
 
79
 
79
   lea     ebx,[eax*3]
80
   lea     ebx,[eax*3]
-
 
81
   cmp     [dr_flag],12 ; 32 bit col cause
-
 
82
   jne     @f
-
 
83
   add     ebx,eax
-
 
84
  @@:
80
   mov     eax,[esi]
85
   mov     eax,[esi]
81
   mov     [edi+ebx],eax
86
   mov     [edi+ebx],eax
82
 .skip:
87
 .skip:
83
   add     esi,3
88
   add     esi,3
-
 
89
   cmp     [dr_flag],12
-
 
90
   jne     @f
-
 
91
   inc     esi
-
 
92
  @@:
84
   inc     dword .x
93
   inc     dword .x
85
   movzx   edx,word[size_x_var]
94
   movzx   edx,word[size_x_var]
86
   cmp     dword .x,edx  ;SIZE_X
95
   cmp     dword .x,edx  ;SIZE_X
87
   jl      .again
96
   jl      .again
88
   mov     dword .x,0
97
   mov     dword .x,0
Line 95... Line 104...
95
   mov     esi,[Zbuffer_ptr]
104
   mov     esi,[Zbuffer_ptr]
96
   mov     edi,[screen_ptr]
105
   mov     edi,[screen_ptr]
97
   movzx   ecx,word[size_x_var]
106
   movzx   ecx,word[size_x_var]
98
   movzx   eax,word[size_y_var]
107
   movzx   eax,word[size_y_var]
99
   imul    ecx,eax
108
   imul    ecx,eax
-
 
109
   cmp         [dr_flag],12
-
 
110
   je          @f
100
   lea     ecx,[ecx*3]
111
   lea     ecx,[ecx*3]
101
   shr     ecx,2
112
   shr     ecx,2
102
 ;  mov     ecx,SIZE_X*SIZE_Y*3/4
113
 ;  mov     ecx,SIZE_X*SIZE_Y*3/4
-
 
114
  @@:
103
   cld
115
   cld
104
   rep     movsd
116
   rep     movsd
Line 105... Line 117...
105
 
117
 
Line 154... Line 166...
154
 mov   ecx,eax
166
 mov   ecx,eax
155
 sub   ecx,ebx
167
 sub   ecx,ebx
156
 sub   ecx,ebx
168
 sub   ecx,ebx
157
 mov   esi,[screen_ptr]
169
 mov   esi,[screen_ptr]
158
 mov   edi,[Zbuffer_ptr]
170
 mov   edi,[Zbuffer_ptr]
-
 
171
 cmp   [dr_flag],12
-
 
172
 je    @f
159
 lea   ebx,[ebx*3]
173
 lea   ebx,[ebx*3]
-
 
174
 jmp   .f
-
 
175
@@:
-
 
176
 shl   ebx,2
-
 
177
.f:
160
 mov   edx,esi
178
 mov   edx,esi
161
 add   esi,ebx
179
 add   esi,ebx
162
 lea   ebx,[ebx+esi]
180
 lea   ebx,[ebx+esi]
163
 pxor  xmm0,xmm0
181
 pxor  xmm0,xmm0
164
 push  eax
182
 push  eax
165
@@:
183
.emb:
-
 
184
 cmp   [dr_flag],12
-
 
185
 je    @f
166
 movlps     xmm1,[esi+3]
186
 movlps     xmm1,[esi+3]
167
 movhps     xmm1,[esi+6]
187
 movhps     xmm1,[esi+6]
168
 punpcklbw  xmm1,xmm0
-
 
169
 movlps     xmm2,[esi-3]
188
 movlps     xmm2,[esi-3]
170
 movhps     xmm2,[esi]
189
 movhps     xmm2,[esi]
171
 punpcklbw  xmm2,xmm0
-
 
172
 movlps     xmm3,[ebx]
190
 movlps     xmm3,[ebx]
173
 movhps     xmm3,[ebx+3]
191
 movhps     xmm3,[ebx+3]
174
 movlps     xmm4,[edx]
192
 movlps     xmm4,[edx]
175
 movhps     xmm4,[edx+3]
193
 movhps     xmm4,[edx+3]
-
 
194
 jmp        .ff
-
 
195
@@:
-
 
196
 movlps     xmm1,[esi+4]
-
 
197
 movhps     xmm1,[esi+8]
-
 
198
 movlps     xmm2,[esi-4]
-
 
199
 movhps     xmm2,[esi]
-
 
200
 movlps     xmm3,[ebx]
-
 
201
 movhps     xmm3,[ebx+4]
-
 
202
 movlps     xmm4,[edx]
-
 
203
 movhps     xmm4,[edx+4]
-
 
204
.ff:
-
 
205
 punpcklbw  xmm1,xmm0
-
 
206
 punpcklbw  xmm2,xmm0
176
 punpcklbw  xmm3,xmm0
207
 punpcklbw  xmm3,xmm0
177
 punpcklbw  xmm4,xmm0
208
 punpcklbw  xmm4,xmm0
178
 psubsw     xmm1,xmm2
209
 psubsw     xmm1,xmm2
179
 paddw      xmm1,[emboss_bias]
210
 paddw      xmm1,[emboss_bias]
180
 psubsw     xmm3,xmm4
211
 psubsw     xmm3,xmm4
Line 197... Line 228...
197
end if
228
end if
198
 pmaxsw      xmm1,xmm3
229
 pmaxsw      xmm1,xmm3
Line 199... Line 230...
199
 
230
 
200
 movd        eax,xmm1
231
 movd        eax,xmm1
-
 
232
 movzx       eax,al
-
 
233
; cmp         [dr_flag],12
201
 movzx       eax,al
234
; je          @f
-
 
235
 lea         eax,[eax*3+envmap_cub]
-
 
236
; jmp         .fff
-
 
237
;@@:
202
 lea         eax,[eax*3+envmap_cub]
238
 
203
 mov         eax,[eax]
239
 mov         eax,[eax]
204
 mov        [edi],eax  ;xmm1
240
 mov        [edi],eax  ;xmm1
205
 psrldq     xmm1,8
241
 psrldq     xmm1,8
206
 movd       eax,xmm1
242
 movd       eax,xmm1
207
 movzx      eax,al
243
 movzx      eax,al
208
 lea        eax,[eax*3+envmap_cub]
244
 lea        eax,[eax*3+envmap_cub]
209
 mov        eax,[eax]
245
 mov        eax,[eax]
Line -... Line 246...
-
 
246
 mov        [edi+4],eax
-
 
247
 
-
 
248
 cmp    [dr_flag],12
-
 
249
 jne    @f
-
 
250
 add    esi,2
-
 
251
 add    ebx,2
Line 210... Line 252...
210
 mov        [edi+4],eax
252
 add    edx,2
211
 
253
@@:
212
 
254
 
213
 add    edi,8
255
 add    edi,8
214
 add    esi,6
256
 add    esi,6
215
 add    ebx,6
257
 add    ebx,6
Line 216... Line 258...
216
 add    edx,6
258
 add    edx,6
217
 sub    ecx,2
259
 sub    ecx,2
218
 jnc    @b
260
 jnc    .emb
-
 
261
 
-
 
262
 
219
 
263
 pop    ecx  ;,eax
220
 
264
 mov    edi,[screen_ptr]
221
 pop    ecx  ;,eax
265
 mov    esi,[Zbuffer_ptr]
222
 mov    edi,[screen_ptr]
266
 cmp    [dr_flag],12
-
 
267
 je     .e
-
 
268
@@:
-
 
269
 movsd
223
 mov    esi,[Zbuffer_ptr]
270
 dec    edi
-
 
271
 loop   @b
224
@@:
272
.e:
Line 225... Line 273...
225
 movsd
273
 rep    movsd
226
 dec    edi
274
 
227
 loop   @b
275
end if