00001 /********************************************************************** 00002 * FILE: video.h 00003 * AUTHOR: CAL 00004 * DATE: 17 April 1993 00005 * PURPOSE: 00006 * Contains Video class to initialize the Borland Graphics 00007 * Interface. 00008 * USAGE: 00009 * A global instance should be declared as such: 00010 * Video graphics (graphics_mode); 00011 * where graphics_mode is one of the enumerated supported modes. 00012 * WARNING: 00013 * If the BGI driver is linked, define the LINK_BGI directive. 00014 * Otherwise, it will search for the proper .BGI file in the 00015 * current directory. If the font files are linked, define 00016 * the LINK_FONT directive. Otherwise, it will search for 00017 * the proper .CHR files in the current directory durring 00018 * runtime. 00019 ***********************************************************************/ 00020 00021 #ifndef _VIDEO_H 00022 #define _VIDEO_H 00023 00024 #include <graphics.h> 00025 00026 /********************************************************************** 00027 * Supported Modes 00028 ***********************************************************************/ 00029 00030 enum VideoModes { VGAHi, Detect }; 00031 00032 00033 /********************************************************************** 00034 * Class Definition 00035 ***********************************************************************/ 00036 00037 class Video 00038 { 00039 VideoModes Mode; 00040 public: 00041 Video (VideoModes mode); 00042 ~Video (void); 00043 int GetMaxX (void) { return getmaxx (); } 00044 int GetMaxY (void) { return getmaxy (); } 00045 int GetMaxColor (void) { return getmaxcolor (); } 00046 }; 00047 00048 extern Video Screen; // Global instance 00049 00050 #endif