en:docs:tpro

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:docs:tpro [2025/02/08 06:21] prokusheven:docs:tpro [2025/02/08 13:36] (current) prokushev
Line 262: Line 262:
 Change Number video attributes to Attr starting at window Row,Col Change Number video attributes to Attr starting at window Row,Col
  
-procedure MoveScreen(var Source, Dest; Length : Word); +===== MoveScreen =====
-  {-Move Length words from Source to Dest without snow}+
  
-procedure FlexWrite(St : string; RowCol : Bytevar FAttrs FlexAttrs); +<code pascal>procedure MoveScreen(var SourceDestLength Word);</code>
-  {-Write St at Row,Col with flexible color handling}+
  
-procedure FlexWriteWindow(St : string; Row, Col : Byte; var FAttrs : FlexAttrs); +Move Length words from Source to Dest without snow
-  {-Write a string flexibly using window-relative coordinates.}+
  
-function SaveWindow(XLow, YLow, XHigh, YHigh : Byte; Allocate : Boolean; +===== FlexWrite =====
-                    var Covers : Pointer) : Boolean; +
-  {-Allocate buffer space if requested and save window contents}+
  
-procedure RestoreWindow(XLowYLow, XHigh, YHigh : Byte+<code pascal>procedure FlexWrite(St : string; RowCol : Byte; var FAttrs FlexAttrs);</code>
-                        Deallocate : Boolean; var Covers Pointer); +
-  {-Restore screen contents and deallocate buffer space if requested}+
  
-procedure StoreWindowCoordinates(var WC : WindowCoordinates); +Write St at Row,Col with flexible color handling
-  {-Store the window coordinates for the active window}+
  
-procedure RestoreWindowCoordinates(WC : WindowCoordinates); +===== FlexWriteWindow =====
-  {-Restore previously saved window coordinates}+
  
-function PackWindow(XLow, YLowXHigh, YHigh : BytePackedWindowPtr; +<code pascal>procedure FlexWriteWindow(St :string; RowCol: Byte; var FAttrsFlexAttrs);</code>
-  {-Return a pointer to a packed window, or nil if not enough memory}+
  
-procedure DispPackedWindow(PWP : PackedWindowPtr); +Write a string flexibly using window-relative coordinates.
-  {-Display the packed window pointed to by PWP}+
  
-procedure DispPackedWindowAt(PWP : PackedWindowPtr; Row, Col : Byte); +===== SaveWindow =====
-  {-Display the packed window pointed to by PWP at Row,Col. If necessary, +
-   the coordinates are adjusted to allow it to fit on the screen.}+
  
-procedure MapPackedWindowColors(PWP PackedWindowPtr); +<code pascal>function SaveWindow(XLow, YLow, XHigh, YHigh Byte; Allocate : Boolean; var Covers : Pointer: Boolean;</code>
-  {-Map the colors in a packed window for improved appearance on mono/B&W +
-   displays}+
  
-procedure DisposePackedWindow(var PWP : PackedWindowPtr); +Allocate buffer space if requested and save window contents
-  {-Dispose of a packed window, setting PWP to nil on exit}+
  
-procedure WritePackedWindow(PWP : PackedWindowPtr; FName : string); +===== RestoreWindow =====
-  {-Store the packed window pointed to by PWP in FName}+
  
-function ReadPackedWindow(FName string) PackedWindowPtr; +<code pascal>procedure RestoreWindow(XLow, YLow, XHigh, YHigh Byte; Deallocate Boolean; var Covers : Pointer);</code>
-  {-Read the packed window stored in FName into memory}+
  
-function CreateLibrary(var F : file; Name : string; +Restore screen contents and deallocate buffer space if requested
-                       Entries : Byte) : DirectoryPtr; +
-  {-Create a library with the specified # of directory entries}+
  
-function OpenLibrary(var F : file; Name : string) : DirectoryPtr; +===== StoreWindowCoordinates =====
-  {-Open the specified library and return a pointer to its directory}+
  
-procedure CloseLibrary(var file; var DP : DirectoryPtr); +<code pascal>procedure StoreWindowCoordinates(var WC WindowCoordinates);</code>
-  {-Close library F and deallocate its directory}+
  
-procedure PackLibrary(LName : string); +Store the window coordinates for the active window
-  {-Pack a library to remove deleted entries.}+
  
-procedure AddWindowToLibrary(PWP : PackedWindowPtr; var F : file; +===== RestoreWindowCoordinates =====
-                             DP : DirectoryPtr; WinName : LibName); +
-  {-Add a packed window to the specified library}+
  
-function ReadWindowFromLibrary(var F file; DP : DirectoryPtr; +<code pascal>procedure RestoreWindowCoordinates(WC WindowCoordinates);</code>
-                               WinName : LibName: PackedWindowPtr; +
-  {-Read a packed window from a library}+
  
-procedure DeleteWindowFromLibrary(var F : file; DP : DirectoryPtr; +Restore previously saved window coordinates
-                                  WinName : LibName); +
-  {-Delete a packed window from the specified library}+
  
-function MapColor(c : Byte) : Byte; +===== PackWindow =====
-  {-Map a video attribute for visibility on mono/bw displays}+
  
-procedure SetBlink(Status Boolean); +<code pascal>function PackWindow(XLow, YLow, XHigh, YHigh Byte: PackedWindowPtr;</code>
-  {-Enable text mode attribute blinking if On is True}+
  
-procedure SetCrtBorder(Attr : Byte); +Return a pointer to a packed window, or nil if not enough memory
-  {-Set border to background color if card type and mode allow}+
  
-function Font8x8Selected : Boolean; +===== DispPackedWindow =====
-  {-Return True if EGA or VGA is active and in 8x8 font}+
  
-procedure SelectFont8x8(Status Boolean); +<code pascal>procedure DispPackedWindow(PWP PackedWindowPtr);</code>
-  {-Toggle 8x8 font on or off}+
  
-function HercPresent : Boolean; +Display the packed window pointed to by PWP
-  {-Return true if a Hercules graphics card is present}+
  
-procedure SwitchInColorCard(ColorOn : Boolean); +===== DispPackedWindowAt =====
-  {-Activate or deactivate colors on a Hercules InColor card}+
  
-function HercGraphicsMode Boolean; +<code pascal>procedure DispPackedWindowAt(PWP PackedWindowPtrRow, Col : Byte);</code>
-  {-Return True if a Hercules card is in graphics mode}+
  
-function HercModeTestWorks : Boolean; +Display the packed window pointed to by PWP at Row,Col. If necessary, the coordinates are adjusted to allow it to fit on the screen.
-  {-Return True if HercGraphicsMode will work}+
  
-procedure SetHercMode(GraphMode : Boolean; GraphPage : Byte); +===== MapPackedWindowColors =====
-  {-Set Hercules card to graphics mode or text mode, and activate specified +
-   graphics page (if switching to graphics mode).}+
  
-function ReadKeyWord Word; +<code pascal>procedure MapPackedWindowColors(PWP PackedWindowPtr);</code>
-  {-Waits for keypress, then returns scan and character codes together}+
  
-function CheckKbd(var KeyCode : Word) : Boolean; +Map the colors in packed window for improved appearance on mono/B&W displays
-  {-Returns True (and the key codes) if keystroke is waiting}+
  
-function KbdFlags : Byte; +===== DisposePackedWindow =====
-  {-Returns keyboard status flags as a bit-coded byte}+
  
-procedure StuffKey(Word); +<code pascal>procedure DisposePackedWindow(var PWP PackedWindowPtr);</code>
-  {-Stuff one key into the keyboard buffer}+
  
-procedure StuffString(S : string); +Dispose of a packed window, setting PWP to nil on exit
-  {-Stuff the contents of S into the keyboard buffer}+
  
-procedure ReInitCrt; +===== WritePackedWindow =====
-  {-Reinitialize CRT unit's internal variables. For TSR's or programs with +
-   DOS shells. May reset: CurrentMode, ScreenWidth, ScreenHeight, +
-   WindMin/WindMax, CurrentPage, CurrentDisplay, CheckSnow, and VideoSegment}+
  
-{$ifdef WIN32} +<code pascal>procedure WritePackedWindow(PWP PackedWindowPtrFName string);</code>
-procedure SetSafeCPSwitching(FBoolean); +
-procedure SetUseACP(FBoolean); +
-{$ENDIF}+
  
 +Store the packed window pointed to by PWP in FName
  
-procedure AssignConToCrt;+===== ReadPackedWindow =====
  
-procedure ClrScr; +<code pascal>function ReadPackedWindow(FName : string) : PackedWindowPtr;</code>
-  {-Clears the screen and returns the cursor to the upper-left corner}+
  
-procedure TextBackground(Color: Byte); +Read the packed window stored in FName into memory
-  {-Selects the background color}+
  
-procedure TextColor(Color: Byte); +===== CreateLibrary =====
-  {-Selects the foreground character color}+
  
-procedure Window(X1,Y1,X2,Y2: Byte); +<code pascal>function CreateLibrary(var F : file; Name : string; Entries : Byte) : DirectoryPtr;</code>
-  {-Defines a text window on the screen}+
  
-procedure GotoXY(X,Y: Byte); +Create a library with the specified # of directory entries
-  {-Moves the cursor to the given coordinates within the screen}+
  
-function WhereX: Byte; +===== OpenLibrary =====
-  {-Returns the X coordinate of the current cursor location}+
  
-function WhereYByte; +<code pascal>function OpenLibrary(var F fileName : string) : DirectoryPtr;</code>
-  {-Returns the Y coordinate of the current cursor location}+
  
-procedure ClrEol; +Open the specified library and return a pointer to its directory
-  {-Clears all characters from the cursor position to the end of the line } +
-  { without moving the cursor.                                            }+
  
-function KeyPressed: Boolean; +===== CloseLibrary =====
-  {-Determines if a key has been pressed on the keyboard and returns True } +
-  { if a key has been pressed                                             }+
  
-function ReadKeyChar; +<code pascal>procedure CloseLibrary(var F : file; var DP DirectoryPtr);</code>
-  {-Reads a character from the keyboard and returns a character or an     } +
-  { extended scan code.                                                   }+
  
-procedure TextMode (Mode: word); +Close library F and deallocate its directory
-procedure InsLine; +
-  {-Inserts an empty line at the cursor position}+
  
-procedure DelLine; +===== PackLibrary =====
-  {-Deletes the line containing the cursor}+
  
-procedure LowVideo; +<code pascal>procedure PackLibrary(LName : string);</code>
-  {-Selects low intensity characters}+
  
-procedure HighVideo; +Pack a library to remove deleted entries.
-  {-Selects high-intensity characters}+
  
-procedure NormVideo; +===== AddWindowToLibrary =====
-  {-Selects normal intensity characters}+
  
-procedure Delay(MSWord); +<code pascal>procedure AddWindowToLibrary(PWP PackedWindowPtrvar F fileDP : DirectoryPtrWinName LibName);</code>
-procedure Sound(HzWord); +
-procedure NoSound; +
-procedure AssignCrt(var FText); +
-  {-Associates a text file with CRT device.}+
  
-procedure PlaySound(Freq,Duration: Longint); +Add a packed window to the specified library 
-  {-Setups window coordinates }+ 
 +===== ReadWindowFromLibrary ===== 
 + 
 +<code pascal>function ReadWindowFromLibrary(var F : file; DP : DirectoryPtr; WinName : LibName) : PackedWindowPtr;</code> 
 + 
 +Read a packed window from a library 
 + 
 +===== DeleteWindowFromLibrary ===== 
 + 
 +<code pascal>procedure DeleteWindowFromLibrary(var F : file; DP : DirectoryPtr; WinName : LibName);</code> 
 + 
 +Delete a packed window from the specified library 
 + 
 +===== MapColor ===== 
 + 
 +<code pascal>function MapColor(c : Byte) : Byte;</code> 
 + 
 +Map a video attribute for visibility on mono/bw displays 
 + 
 +===== SetBlink ===== 
 + 
 +<code pascal>procedure SetBlink(Status : Boolean);</code> 
 + 
 +Enable text mode attribute blinking if On is True 
 + 
 +===== SetCrtBorder ===== 
 + 
 +<code pascal>procedure SetCrtBorder(Attr : Byte);</code> 
 + 
 +Set border to background color if card type and mode allow 
 + 
 +===== Font8x8Selected ===== 
 + 
 +<code pascal>function Font8x8Selected : Boolean;</code> 
 + 
 +Return True if EGA or VGA is active and in 8x8 font 
 + 
 +===== SelectFont8x8 ===== 
 + 
 +<code pascal>procedure SelectFont8x8(Status : Boolean);</code> 
 + 
 +Toggle 8x8 font on or off 
 + 
 +===== HercPresent ===== 
 + 
 +<code oascal>function HercPresent : Boolean;</code> 
 + 
 +Return true if a Hercules graphics card is present 
 + 
 +===== SwitchInColorCard ===== 
 + 
 +<code pascal>procedure SwitchInColorCard(ColorOn : Boolean);</code> 
 + 
 +Activate or deactivate colors on a Hercules InColor card 
 + 
 +===== HercGraphicsMode ===== 
 + 
 +<code pascal>function HercGraphicsMode : Boolean;</code> 
 + 
 +Return True if a Hercules card is in graphics mode 
 + 
 +===== HercModeTestWorks ===== 
 + 
 +<code pascal>function HercModeTestWorks : Boolean;</code> 
 + 
 +Return True if HercGraphicsMode will work 
 + 
 +===== SetHercMode ===== 
 + 
 +<code pascal>procedure SetHercMode(GraphMode : Boolean; GraphPage : Byte);</code> 
 + 
 +Set Hercules card to graphics mode or text mode, and activate specified graphics page (if switching to graphics mode). 
 + 
 +===== ReadKeyWord ===== 
 + 
 +<code pascal>function ReadKeyWord : Word;</code> 
 + 
 +Waits for keypress, then returns scan and character codes together 
 + 
 +===== CheckKbd ===== 
 + 
 +<code pascal>function CheckKbd(var KeyCode : Word) : Boolean;</code> 
 + 
 +Returns True (and the key codes) if a keystroke is waiting 
 + 
 +===== KbdFlags ===== 
 + 
 +<code pascal>function KbdFlags : Byte;</code> 
 + 
 +Returns keyboard status flags as a bit-coded byte 
 + 
 +===== StuffKey ===== 
 + 
 +<code pascal>procedure StuffKey(W : Word);</code> 
 + 
 +Stuff one key into the keyboard buffer 
 + 
 +===== StuffString ===== 
 + 
 +<code pascal>procedure StuffString(S : string);</code> 
 + 
 +Stuff the contents of S into the keyboard buffer 
 + 
 +===== ReInitCrt ===== 
 + 
 +<code pascal>procedure ReInitCrt;</code> 
 + 
 +Reinitialize CRT unit's internal variables. For TSR's or programs with DOS shells. May reset: CurrentMode, ScreenWidth, ScreenHeight, WindMin/WindMax, CurrentPage, CurrentDisplay, CheckSnow, and VideoSegment 
 + 
 +===== SetSafeCPSwitching ===== 
 + 
 +<code psacal>procedure SetSafeCPSwitching(F: Boolean);</code> 
 + 
 +===== SetUseACP ===== 
 + 
 +<code pascal>procedure SetUseACP(F: Boolean);</code> 
 + 
 + 
 +===== AssignConToCrt ===== 
 + 
 +<code pascal>procedure AssignConToCrt;</code> 
 + 
 +===== ClrScr ===== 
 + 
 +<code psacal>procedure ClrScr;</code> 
 + 
 +Clears the screen and returns the cursor to the upper-left corner 
 + 
 +===== TextBackground ===== 
 + 
 +<code pascal>procedure TextBackground(Color: Byte);</code> 
 + 
 +Selects the background color 
 + 
 +===== TextColor ===== 
 + 
 +<code pascal>procedure TextColor(Color: Byte);</code> 
 + 
 +Selects the foreground character color 
 + 
 +===== Window ===== 
 + 
 +<code pascal>procedure Window(X1,Y1,X2,Y2: Byte);</code> 
 + 
 +Defines a text window on the screen 
 + 
 +===== GotoXY ===== 
 + 
 +<code pascal>procedure GotoXY(X,Y: Byte);</code> 
 + 
 +Moves the cursor to the given coordinates within the screen 
 + 
 +===== WhereX ===== 
 + 
 +<code pascal>function WhereX: Byte;</code> 
 + 
 +Returns the X coordinate of the current cursor location 
 + 
 +===== WhereY ===== 
 + 
 +<code pascal>function WhereY: Byte;</code> 
 + 
 +Returns the Y coordinate of the current cursor location 
 + 
 +===== ClrEol ===== 
 + 
 +<code pascal>procedure ClrEol;</code> 
 + 
 +Clears all characters from the cursor position to the end of the line without moving the cursor. 
 + 
 +===== KeyPressed ===== 
 + 
 +<code pascal>function KeyPressed: Boolean;</code> 
 + 
 +Determines if a key has been pressed on the keyboard and returns True if a key has been pressed 
 + 
 +===== ReadKey ===== 
 + 
 +<code pascal>function ReadKey: Char;</code> 
 + 
 +Reads a character from the keyboard and returns a character or an extended scan code. 
 + 
 +===== TextMode ===== 
 + 
 +<code pascal>procedure TextMode (Mode: word);</code> 
 + 
 +===== InsLine ===== 
 + 
 +<code pascal>procedure InsLine;</code> 
 + 
 +Inserts an empty line at the cursor position 
 + 
 +===== DelLine ===== 
 + 
 +<code pascal>procedure DelLine;</code> 
 + 
 +Deletes the line containing the cursor 
 + 
 +===== LowVideo ===== 
 + 
 +<code pascal>procedure LowVideo;</code> 
 + 
 +Selects low intensity characters 
 + 
 +===== HighVideo ===== 
 + 
 +<code pascal>procedure HighVideo;</code> 
 + 
 +Selects high-intensity characters 
 + 
 +===== NormVideo ===== 
 + 
 +<code pascal>procedure NormVideo;</code> 
 + 
 +Selects normal intensity characters 
 + 
 +===== Delay ===== 
 + 
 +<code pascal>procedure Delay(MS: Word);</code> 
 + 
 +===== Sound ===== 
 + 
 +<code pascal>procedure Sound(Hz: Word);</code> 
 + 
 +===== NoSound ===== 
 + 
 +<code pascal>procedure NoSound;</code> 
 + 
 +===== AssignCrt ===== 
 + 
 +<code pascal>procedure AssignCrt(var F: Text);</code> 
 + 
 +Associates a text file with CRT device. 
 + 
 +===== PlaySound ===== 
 + 
 +<code pascal>procedure PlaySound(Freq,Duration: Longint);</code> 
 + 
 +Setups window coordinates  
 + 
 +===== GetLastMode ===== 
 + 
 +<code pascal>procedure GetLastMode;</code>
  
-procedure GetLastMode;