Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Video Class Reference

#include <video.h>

List of all members.

Public Methods

 Video (VideoModes mode)
 ~Video (void)
int GetMaxX (void)
int GetMaxY (void)
int GetMaxColor (void)

Private Attributes

VideoModes Mode


Constructor & Destructor Documentation

Video::Video VideoModes    mode
 

Definition at line 19 of file video.c.

References mode, VGAHi, and VideoModes.

00019                              : Mode (mode)
00020 {
00021   int gdriver, gmode, err;
00022   void far *driver;
00023 
00024   switch (Mode)     // Check the video mode
00025   {
00026     case VGAHi:
00027       gdriver = VGA;
00028       gmode   = VGAHI;
00029       break;
00030     default:
00031       gdriver = DETECT;
00032   };
00033 
00034 #ifdef LINK_BGI
00035   switch (Mode)
00036   {
00037     case VGAHi:
00038       driver = EGAVGA_driver_far;
00039       break;
00040   }
00041 
00042   err = registerfarbgidriver(driver); // Register the driver (linked in)
00043   if (err < 0)
00044   {
00045     printf("Graphics error: %s\n", grapherrormsg(err));
00046     printf("Press any key to halt:\n");
00047     getch();
00048     exit(1); /* terminate with an error code */
00049   }
00050 #endif
00051 #ifdef LINK_FONT
00052   registerfarbgifont (triplex_font_far);  // Register linked fonts
00053   registerfarbgifont (gothic_font_far);
00054   registerfarbgifont (small_font_far);
00055   registerfarbgifont (sansserif_font_far);
00056 #endif
00057 
00058   initgraph(&gdriver, &gmode, "");  // Initialize graphics
00059   err = graphresult();
00060   if (err != grOk)  /* an error occurred */
00061   {
00062     printf("Graphics error: %s\n", grapherrormsg(err));
00063     printf("Press any key to halt:\n");
00064     getch();
00065     exit(1); /* terminate with an error code */
00066   }
00067 
00068 }

Video::~Video void   
 

Definition at line 74 of file video.c.

00075 {
00076   closegraph ();
00077 }


Member Function Documentation

int Video::GetMaxColor void    [inline]
 

Definition at line 45 of file video.h.

00045 { return getmaxcolor (); }

int Video::GetMaxX void    [inline]
 

Definition at line 43 of file video.h.

00043 { return getmaxx (); }

int Video::GetMaxY void    [inline]
 

Definition at line 44 of file video.h.

00044 { return getmaxy (); }


Member Data Documentation

VideoModes Video::Mode [private]
 

Definition at line 39 of file video.h.


The documentation for this class was generated from the following files:
Generated on Sun Jul 6 23:07:18 2003 for Scotland Yard by doxygen1.2.15