home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1989 / 04 / extra / monitor.tp3 < prev    next >
Encoding:
Text File  |  1989-01-25  |  1.5 KB  |  64 lines

  1. {************************************************}
  2. {*                 MONITOR.TP3                  *}
  3. {*     Monitortreiber für das Grafiksystem für  *}
  4. {*          IBM-Kompatible unter Turbo 3.0      *}
  5. {*          (C) 1989 S.Szkaradnik & TOOLBOX     *}
  6. {************************************************}
  7. (* Overlay *) (* Bei Speichermangel in Turbo 3.0*)
  8.               (* als Overlay deklarieren !      *)
  9. Procedure MonitorDriver(Var Par:Parameters);
  10.  
  11.  
  12.  
  13. Function Open : Boolean ;
  14. Begin
  15.    Device := Monitor ;
  16.    Xmin := 0 ; Xmax := 639 ;
  17.    Ymin := 0 ; Ymax := 199 ;
  18.    HiRes;
  19.    Open := True ;
  20.    (* Keine Abfrage von Fehlersituationen  !!!! *)
  21. End ;
  22.  
  23.  
  24. Function CloseMon : BOOLEAN;
  25. BEGIN
  26.   TextMode;
  27.   CloseMon := TRUE;
  28.   (* Keine Abfrage von Fehlersituationen !!!! *)
  29. END;
  30.  
  31. Function Point ( X, Y : Integer ) : Boolean ;
  32. Begin
  33.   If ( X >= Xmin ) And ( X <= Xmax )
  34.      And ( Y >= Ymin ) And ( Y <= Ymax )
  35.     Then
  36.         Point := TRUE (* (GetDotColor(X,Y) > 0); *)
  37.     Else Fence ;
  38. End ;
  39.  
  40. Procedure Dot ( X, Y : Integer ) ;
  41. Begin
  42.   Control ( X, Y ) ;
  43.   If Tool = Pen Then
  44.     Plot(X,Y,1);
  45. End ;
  46.  
  47. Procedure Plot ( X, Y : Integer ) ;
  48. Begin
  49.   Control ( X, Y ) ;
  50.   Position.X := X ; Position.Y := Y ;
  51. End ;
  52.  
  53. Begin
  54.   With Par Do
  55.     Case Command Of
  56.       OpenF  : Result := Open ;
  57.       PointF : Result := Point ( X, Y ) ;
  58.       PlotF  : Plot ( X, Y ) ;
  59.       DotF   : Dot ( X, Y ) ;
  60.       ClearF : HiRes ;
  61.       CloseF : Result := CloseMon ;
  62.     End ;
  63. End ;
  64.