home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 113 / EnigmaAmiga113CD.iso / software / sviluppo / quakeworld_src / client / r_misc68k.s < prev    next >
Encoding:
Text File  |  2000-06-17  |  2.0 KB  |  85 lines

  1. * Copyright (C) 1996-1997 Id Software, Inc. 
  2. * This program is free software; you can redistribute it and/or 
  3. * modify it under the terms of the GNU General Public License 
  4. * as published by the Free Software Foundation; either version 2 
  5. * of the License, or (at your option) any later version. 
  6. * This program is distributed in the hope that it will be useful, 
  7. * but WITHOUT ANY WARRANTY; without even the implied warranty of 
  8. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   
  9. * See the GNU General Public License for more details. 
  10. * You should have received a copy of the GNU General Public License 
  11. * along with this program; if not, write to the Free Software 
  12. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
  13.  
  14. **
  15. ** Quake for AMIGA
  16. ** r_misc.c assembler implementations by Frank Wille <frank@phoenix.owl.de>
  17. **
  18.  
  19.         XREF    _vright
  20.         XREF    _vup
  21.         XREF    _vpn
  22.  
  23.         XDEF    _TransformVector
  24.  
  25. ******************************************************************************
  26. *
  27. *       void _TransformVector (vec3_t in, vec3_t out)
  28. *
  29. ******************************************************************************
  30.  
  31.         cnop    0,4
  32. _TransformVector
  33.  
  34.         rsreset
  35. .fpuregs        rs.x    3
  36. .regs           rs.l    1
  37.         rs.l    1
  38. .in             rs.l    1
  39. .out            rs.l    1
  40.  
  41.         move.l  a2,-(sp)
  42.         fmovem.x        fp2-fp4,-(sp)
  43.         move.l  .out(sp),a2
  44.         move.l  .in(sp),a0
  45.         fmove.s (a0)+,fp0
  46.         fmove.s (a0)+,fp1
  47.         fmove.s (a0)+,fp2
  48.         lea     _vright,a1
  49.         fmove.s (a1)+,fp3
  50.         fmul    fp0,fp3
  51.         fmove.s (a1)+,fp4
  52.         fmul    fp1,fp4
  53.         fadd    fp3,fp4
  54.         fmove.s (a1)+,fp3
  55.         fmul    fp2,fp3
  56.         fadd    fp3,fp4
  57.         fmove.s fp4,(a2)+
  58.         lea     _vup,a1
  59.         fmove.s (a1)+,fp3
  60.         fmul    fp0,fp3
  61.         fmove.s (a1)+,fp4
  62.         fmul    fp1,fp4
  63.         fadd    fp3,fp4
  64.         fmove.s (a1)+,fp3
  65.         fmul    fp2,fp3
  66.         fadd    fp3,fp4
  67.         fmove.s fp4,(a2)+
  68.         lea     _vpn,a1
  69.         fmul.s  (a1)+,fp0
  70.         fmul.s  (a1)+,fp1
  71.         fadd    fp1,fp0
  72.         fmul.s  (a1)+,fp2
  73.         fadd    fp2,fp0
  74.         fmove.s fp0,(a2)+
  75.         fmovem.x        (sp)+,fp2-fp4
  76.         move.l  (sp)+,a2
  77.         rts
  78.  
  79.