qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
EGA.PAS
  Example Contents Index                                    Back
 
PROGRAM ega;
 
{ EGA.PAS : Demonstrates EGA/VGA palettes }
 
USES
    MSGraph;
 
CONST
    crlf = #13 + #10;
 
VAR
    a : LongInt;
    m : Integer;
 
BEGIN    { Begin main program }
 
    m := _SetVideoMode( _MaxColorMode );
    _SetColor( 4 );
    _Rectangle( _GFillInterior, 50, 50, 150, 150 );
 
    _SetTextPosition( 1, 1 );
    _OutText( 'Normal palette' + crlf );
    _OutText( 'Press ENTER' );
    Readln;
 
    a := _RemapPalette( 4, _Blue );
 
    _SetTextPosition( 1, 1 );
    _OutText( 'Remapped palette' + crlf );
    _OutText( 'Press ENTER' );
    Readln;
 
    a := _RemapPalette( 4, _Red );
 
    _SetTextPosition( 1, 1 );
    _OutText( 'Restored palette' + crlf );
    _OutText( 'Press ENTER to clear the screen' );
    Readln;
 
    _ClearScreen( _GClearScreen );
    m := _SetVideoMode( _DefaultMode );
 
END.