home *** CD-ROM | disk | FTP | other *** search
Modula Definition | 1992-05-02 | 1.7 KB | 52 lines |
- (* Graphics BIOS Graphics 1991 Chris Harshman
- This Module was designed to give CGA and EGA graphics commands to
- Fitted Software Tools Modula-2 compiler. Included are Procedures to
- set video mode, draw a dot, box, or circle, and a function to return
- the color of a point on the screen *)
-
- DEFINITION MODULE Graphics;
-
- PROCEDURE SetCga320;
- (* Sets screen mode to 320x200 4 color graphics *)
-
- PROCEDURE SetCgaMono;
- (* Sets screen mode to 640x200 2 color graphics *)
-
- PROCEDURE SetEga320;
- (* Sets screen mode to 320x200 16 color graphics *)
-
- PROCEDURE SetEga640;
- (* Sets screen mode to 640x200 16 color graphics *)
-
- PROCEDURE SetPlus;
- (* Sets screen mode to 640x350 16 color graphics on EGA boards or
- to 640x200 16 color graphics on Leading Edge computers *)
-
-
- (* color can be in the range 0-3 for CGA and 0-15 for EGA. Coordinates
- are from 0 to the specified range -1 *)
-
- PROCEDURE SetTandy;
- (* Sets screen mode to 320x200 16 color graphics on Tandy or PCjr *)
-
- PROCEDURE SetBackground(color:INTEGER);
- (* Sets the background color for graphics screens. Can also be used to
- change the border on text screens. *)
-
- PROCEDURE Dot(color,xloc,yloc:INTEGER);
- (* Puts a dot of color on the screen at the specified x,y coordinates *)
-
- PROCEDURE Box(color,x1,y1,x2,y2:INTEGER);
- (* Frame a box of color from coord x1,y1 to x2,y2 *)
-
- PROCEDURE Circle(color,xloc,yloc,rad:INTEGER);
- (* Draws an elipse with center xloc,yloc of color with radius rad *)
-
- PROCEDURE Look(xloc,yloc:INTEGER):INTEGER;
- (* Returns the color of the given coordinates *)
-
- PROCEDURE Clear;
- (* Clears the screen, slower than Cls FROM Text *)
-
- END Graphics.