2 Copyright (C) 1996-1997 Id Software, Inc.
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 // x86 assembly-language turbulent texture mapping code
36 //----------------------------------------------------------------------
37 // turbulent texture mapping code
38 //----------------------------------------------------------------------
41 .globl C(D_DrawTurbulent8Span)
42 C
(D_DrawTurbulent8Span
):
43 pushl
%ebp
// preserve caller
's stack frame pointer
44 pushl %esi // preserve register variables
50 movl C(r_turb_pdest),%edi
51 movl C(r_turb_spancount),%ebx
57 movl C(r_turb_turb),%ebp
61 movl (%ebp,%eax,4),%eax
62 movl (%ebp,%edx,4),%edx
67 andl $(TURB_TEX_SIZE-1),%eax
68 andl $(TURB_TEX_SIZE-1),%edx
70 movl C(r_turb_pbase),%ebp
73 addl C(r_turb_sstep),%esi
74 addl C(r_turb_tstep),%ecx
75 movb (%ebp,%edx,1),%dl
80 movl %edi,C(r_turb_pdest)
82 popl %ebx // restore register variables
85 popl %ebp // restore caller's stack frame pointer