home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.graphics
- Path: sparky!uunet!munnari.oz.au!uniwa!cujo!cc.curtin.edu.au!smackinl02
- From: smackinl02@cc.curtin.edu.au
- Subject: WANTED: Mode X Line Draw + Triangle Fill
- Message-ID: <1993Jan6.125558.1@cc.curtin.edu.au>
- Lines: 37
- Sender: news@cujo.curtin.edu.au (News Manager)
- Organization: Curtin University of Technology
- Date: Wed, 6 Jan 1993 03:55:58 GMT
-
- Please note - this is a query specific to VGA graphics on an IBM PC compatible.
-
- Anyone care to help with this one? Specifically I want a nice quick line draw
- routine that has been optimised for Mode X (see Michael Abrash's July '91
- Graphics column in Dr Dobbs Journal).
-
- As I'm programming in Turbo Pascal I'd like either (a) pseudo-code, (b) actual
- pascal code, or preferrably (c) assembly code that I can stick in.
-
- Specifications:
- The code needs to have the following header;
-
- procedure DrawLine (StartX, StartY, EndX, EndY : Word; Colour : Byte; PageBase
- : Word);
-
- where the PageBase is the offset from a000 we are drawing into, and the rest
- should be self explanatory.
-
- The code doesn't need any error checking - it will only be fed valid
- co-ordinates in the range [x] 0-320, [y] 0 - 240, [colour] 0 - 255, and
- [PageBase] 0-FFFFh.
- --
-
- The other thing that I need is a triangle filling routine - it will be fed the
- three vertices and will be expected to order and fill the resultant triangle.
- Again, this will be in mode X and will need to take parameters of the three
- verticies and the pagebase and the colour.
-
- --
-
- E-Mail would be appreciated.
-
- Thankyou for your time and brainpower,
- Simon
- --
- Masochism - "Hit me, Hit me!"
- Sadism - "No."
-