26 #define PARTICLE_OPAQUE 2
37 #if id386 && !defined __linux__ && !defined __FreeBSD__
39 static unsigned s_prefetch_address;
61 __asm mov bl,
byte ptr [edi]
67 __asm mov
al,
byte ptr [
ebp]
69 __asm mov
byte ptr [edi],
al
81 __asm mov bl,
byte ptr [edi]
86 __asm mov
al,
byte ptr [
ebp]
88 __asm mov
byte ptr [edi],
al
95 __asm mov
byte ptr [edi],
al
113 static int u,
v, tmp;
125 static float one = 1.0F;
126 static float point_five = 0.5F;
127 static float eight_thousand_hex = 0x8000;
132 __asm mov ebpsave,
ebp
141 __asm fld dword ptr [esi+0] ; p_o.x
142 __asm fsub dword ptr [
r_origin+0] ; p_o.x-r_o.x
143 __asm fld dword ptr [esi+4] ; p_o.y | p_o.x-r_o.x
144 __asm fsub dword ptr [
r_origin+4] ; p_o.y-r_o.y | p_o.x-r_o.x
145 __asm fld dword ptr [esi+8] ; p_o.z | p_o.y-r_o.y | p_o.x-r_o.x
146 __asm fsub dword ptr [
r_origin+8] ; p_o.z-r_o.z | p_o.y-r_o.y | p_o.x-r_o.x
147 __asm fxch
st(2) ; p_o.x-r_o.x | p_o.y-r_o.y | p_o.z-r_o.z
148 __asm fstp dword ptr [
local+0] ; p_o.y-r_o.y | p_o.z-r_o.z
149 __asm fstp dword ptr [
local+4] ; p_o.z-r_o.z
150 __asm fstp dword ptr [
local+8] ; (empty)
155 __asm fld dword ptr [
local+0] ; l.x
156 __asm fmul dword ptr [
r_pright+0] ; l.x*pr.x
157 __asm fld dword ptr [
local+4] ; l.y | l.x*pr.x
158 __asm fmul dword ptr [
r_pright+4] ; l.y*pr.y | l.x*pr.x
159 __asm fld dword ptr [
local+8] ; l.z | l.y*pr.y | l.x*pr.x
160 __asm fmul dword ptr [
r_pright+8] ; l.z*pr.z | l.y*pr.y | l.x*pr.x
161 __asm fxch
st(2) ; l.x*pr.x | l.y*pr.y | l.z*pr.z
162 __asm faddp
st(1),
st ; l.x*pr.x + l.y*pr.y | l.z*pr.z
163 __asm faddp
st(1),
st ; l.x*pr.x + l.y*pr.y + l.z*pr.z
166 __asm fld dword ptr [
local+0] ; l.x
167 __asm fmul dword ptr [
r_pup+0] ; l.x*pr.x
168 __asm fld dword ptr [
local+4] ; l.y | l.x*pr.x
169 __asm fmul dword ptr [
r_pup+4] ; l.y*pr.y | l.x*pr.x
170 __asm fld dword ptr [
local+8] ; l.z | l.y*pr.y | l.x*pr.x
171 __asm fmul dword ptr [
r_pup+8] ; l.z*pr.z | l.y*pr.y | l.x*pr.x
172 __asm fxch
st(2) ; l.x*pr.x | l.y*pr.y | l.z*pr.z
173 __asm faddp
st(1),
st ; l.x*pr.x + l.y*pr.y | l.z*pr.z
174 __asm faddp
st(1),
st ; l.x*pr.x + l.y*pr.y + l.z*pr.z
177 __asm fld dword ptr [
local+0] ; l.x
178 __asm fmul dword ptr [
r_ppn+0] ; l.x*pr.x
179 __asm fld dword ptr [
local+4] ; l.y | l.x*pr.x
180 __asm fmul dword ptr [
r_ppn+4] ; l.y*pr.y | l.x*pr.x
181 __asm fld dword ptr [
local+8] ; l.z | l.y*pr.y | l.x*pr.x
182 __asm fmul dword ptr [
r_ppn+8] ; l.z*pr.z | l.y*pr.y | l.x*pr.x
183 __asm fxch
st(2) ; l.x*pr.x | l.y*pr.y | l.z*pr.z
184 __asm faddp
st(1),
st ; l.x*pr.x + l.y*pr.y | l.z*pr.z
185 __asm faddp
st(1),
st ; l.x*pr.x + l.y*pr.y + l.z*pr.z
200 __asm cmp eax, particle_z_clip
222 __asm je blendfunc_66
223 __asm jl blendfunc_33
225 __asm jmp done_selecting_blend_func
228 __asm jmp done_selecting_blend_func
231 done_selecting_blend_func:
232 __asm mov blendfunc, ebx
235 __asm mov
ebp, s_prefetch_address
256 __asm fxch
st(1) ;
u |
v
257 __asm fistp dword ptr [
u] ;
v
258 __asm fistp dword ptr [
v] ; (empty)
305 __asm fmul eight_thousand_hex
332 __asm jge check_pix_max
334 __asm jmp skip_pix_clamp
340 __asm jle skip_pix_clamp
369 top_of_pix_vert_loop:
371 top_of_pix_horiz_loop:
385 __asm mov
ax, word ptr [esi]
388 __asm jg end_of_horiz_loop
390 #
if ENABLE_ZWRITES_FOR_PARTICLES
392 __asm mov word ptr [esi], bp
397 __asm call [blendfunc]
405 __asm jnz top_of_pix_horiz_loop
423 __asm jnz top_of_pix_vert_loop
432 __asm mov
ebp, ebpsave
479 int color = pparticle->
color;
603 #if !defined __linux__ && !defined __FreeBSD__
604 extern unsigned long fpu_sp24_cw, fpu_chop_cw;
611 #if id386 && !defined __linux__ && !defined __FreeBSD__
612 __asm fldcw word ptr [fpu_sp24_cw]
618 if ( p->
alpha > 0.66 )
620 else if ( p->
alpha > 0.33 )
628 #if id386 && !defined __linux__ && !defined __FreeBSD__
630 s_prefetch_address = (
unsigned int ) ( p + 1 );
638 #if id386 && !defined __linux__ && !defined __FreeBSD__
639 __asm fldcw word ptr [fpu_chop_cw]