home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource Library: Graphics
/
graphics-16000.iso
/
msdos
/
animutil
/
fastgfx
/
fg110c
/
03-08.c
< prev
next >
Wrap
Text File
|
1992-01-30
|
565b
|
32 lines
#include <fastgraf.h>
#include <stdio.h>
#include <stdlib.h>
void main(void);
void main()
{
int old_mode;
int new_mode;
char string[4];
old_mode = fg_getmode();
new_mode = fg_bestmode(320,200,1);
if (new_mode < 0) {
printf("This program requires a 320 by 200 graphics mode.\n");
exit(1);
}
fg_setmode(new_mode);
fg_setcolor(15);
fg_text("I'm running in mode ",20);
sprintf(string,"%d.",new_mode);
fg_text(string,3);
fg_waitkey();
fg_setmode(old_mode);
fg_reset();
}