|
|
1.1 ! root 1: // ! 2: // d_scana.s ! 3: // x86 assembly-language turbulent texture mapping code ! 4: // ! 5: ! 6: #include "asm_i386.h" ! 7: #include "quakeasm.h" ! 8: #include "asm_draw.h" ! 9: #include "d_ifacea.h" ! 10: ! 11: #if id386 ! 12: ! 13: .data ! 14: ! 15: .text ! 16: ! 17: //---------------------------------------------------------------------- ! 18: // turbulent texture mapping code ! 19: //---------------------------------------------------------------------- ! 20: ! 21: .align 4 ! 22: .globl C(D_DrawTurbulent8Span) ! 23: C(D_DrawTurbulent8Span): ! 24: pushl %ebp // preserve caller's stack frame pointer ! 25: pushl %esi // preserve register variables ! 26: pushl %edi ! 27: pushl %ebx ! 28: ! 29: movl C(r_turb_s),%esi ! 30: movl C(r_turb_t),%ecx ! 31: movl C(r_turb_pdest),%edi ! 32: movl C(r_turb_spancount),%ebx ! 33: ! 34: Llp: ! 35: movl %ecx,%eax ! 36: movl %esi,%edx ! 37: sarl $16,%eax ! 38: movl C(r_turb_turb),%ebp ! 39: sarl $16,%edx ! 40: andl $(CYCLE-1),%eax ! 41: andl $(CYCLE-1),%edx ! 42: movl (%ebp,%eax,4),%eax ! 43: movl (%ebp,%edx,4),%edx ! 44: addl %esi,%eax ! 45: sarl $16,%eax ! 46: addl %ecx,%edx ! 47: sarl $16,%edx ! 48: andl $(TURB_TEX_SIZE-1),%eax ! 49: andl $(TURB_TEX_SIZE-1),%edx ! 50: shll $6,%edx ! 51: movl C(r_turb_pbase),%ebp ! 52: addl %eax,%edx ! 53: incl %edi ! 54: addl C(r_turb_sstep),%esi ! 55: addl C(r_turb_tstep),%ecx ! 56: movb (%ebp,%edx,1),%dl ! 57: decl %ebx ! 58: movb %dl,-1(%edi) ! 59: jnz Llp ! 60: ! 61: movl %edi,C(r_turb_pdest) ! 62: ! 63: popl %ebx // restore register variables ! 64: popl %edi ! 65: popl %esi ! 66: popl %ebp // restore caller's stack frame pointer ! 67: ret ! 68: ! 69: #endif // id386 ! 70:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.