home *** CD-ROM | disk | FTP | other *** search
/ The Party 1994: Try This At Home / disk_image.bin / source / vexsrc / project.asm < prev    next >
Assembly Source File  |  1995-03-29  |  2KB  |  63 lines

  1. comment #
  2. /*****************************************************************************
  3.                                   ATTENTION!
  4.                            this source is VOTEWARE,
  5.               you may only use it to the conditions listed below:
  6.  
  7.   -You may modify it, or use parts of it in your own source as long as
  8.     this header stays on top of all files containing this source.
  9.   -You must give proper credit to the author, Niklas Beisert / pascal.
  10.   -You may not use it in commercial productions without the written
  11.     permission of the author.
  12.   -AND MOST IMPORTANT: you have to buy an Assembly '94 CD-ROM
  13.     by Sound Solutions (if you don't have it already) and vote for VEX-InTrO
  14.     in the PC-64k-Intro-Compo! (if you have already sent your voting card,
  15.     buy another one and fill it out CORRECTLY!!!)
  16. *****************************************************************************/
  17. #
  18.  
  19.  
  20.  
  21. ; // 3dproject points
  22.  
  23. .model large, c
  24. .386
  25. locals
  26.  
  27. .code
  28.  
  29. public projectverts
  30.  
  31. projectverts proc uses si di ds, verts:dword, v:dword, coords:dword, num:word, zoomx:dword, zoomy:dword
  32.   cmp num,0
  33.   je @@x
  34.   cld
  35.   les di,coords
  36.   lds si,v
  37.   lfs cx,verts
  38. @@lp:
  39.     lodsw
  40.     shl ax,2
  41.     mov bx,ax
  42.     shl ax,1
  43.     add bx,ax
  44.     add bx,cx
  45.     mov eax,zoomx
  46.     imul dword ptr fs:[bx+0]
  47.     idiv dword ptr fs:[bx+4]
  48.     add eax,160*65536
  49.     stosd
  50.     mov eax,zoomy
  51.     imul dword ptr fs:[bx+8]
  52.     idiv dword ptr fs:[bx+4]
  53.     neg eax
  54.     add eax,100*65536
  55.     stosd
  56.   dec num
  57.   jnz @@lp
  58. @@x:
  59.   ret
  60. endp
  61.  
  62. end
  63.