#include <video.h>
Public Methods | |
Video (VideoModes mode) | |
~Video (void) | |
int | GetMaxX (void) |
int | GetMaxY (void) |
int | GetMaxColor (void) |
Private Attributes | |
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 } |
|
Definition at line 74 of file video.c.
00075 { 00076 closegraph (); 00077 } |
|
Definition at line 45 of file video.h.
00045 { return getmaxcolor (); } |
|
Definition at line 43 of file video.h.
00043 { return getmaxx (); } |
|
Definition at line 44 of file video.h.
00044 { return getmaxy (); } |
|
|