home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / graphics / 13431 < prev    next >
Encoding:
Text File  |  1993-01-06  |  1.6 KB  |  48 lines

  1. Newsgroups: comp.graphics
  2. Path: sparky!uunet!munnari.oz.au!uniwa!cujo!cc.curtin.edu.au!smackinl02
  3. From: smackinl02@cc.curtin.edu.au
  4. Subject: WANTED: Mode X Line Draw + Triangle Fill
  5. Message-ID: <1993Jan6.125558.1@cc.curtin.edu.au>
  6. Lines: 37
  7. Sender: news@cujo.curtin.edu.au (News Manager)
  8. Organization: Curtin University of Technology
  9. Date: Wed, 6 Jan 1993 03:55:58 GMT
  10.  
  11. Please note - this is a query specific to VGA graphics on an IBM PC compatible.
  12.  
  13. Anyone care to help with this one? Specifically I want a nice quick line draw
  14. routine that has been optimised for Mode X (see Michael Abrash's July '91
  15. Graphics column in Dr Dobbs Journal).
  16.  
  17. As I'm programming in Turbo Pascal I'd like either (a) pseudo-code, (b) actual
  18. pascal code, or preferrably (c) assembly code that I can stick in.
  19.  
  20. Specifications:
  21. The code needs to have the following header;
  22.  
  23. procedure DrawLine (StartX, StartY, EndX, EndY : Word; Colour : Byte; PageBase
  24. : Word);
  25.  
  26. where the PageBase is the offset from a000 we are drawing into, and the rest
  27. should be self explanatory.
  28.  
  29. The code doesn't need any error checking - it will only be fed valid
  30. co-ordinates in the range [x] 0-320, [y] 0 - 240, [colour] 0 - 255, and
  31.   [PageBase] 0-FFFFh.
  32. --
  33.  
  34. The other thing that I need is a triangle filling routine - it will be fed the
  35. three vertices and will be expected to order and fill the resultant triangle.
  36. Again, this will be in mode X and will need to take parameters of the three
  37. verticies and the pagebase and the colour.
  38.  
  39. --
  40.  
  41. E-Mail would be appreciated.
  42.  
  43. Thankyou for your time and brainpower,
  44. Simon
  45. --
  46. Masochism - "Hit me, Hit me!"
  47. Sadism - "No."
  48.