home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ Games Programming
/
CPPGAMES.ISO
/
fgl
/
fglight
/
exc.arj
/
TEMP
/
09-13.C
< prev
next >
Wrap
Text File
|
1995-01-20
|
747b
|
43 lines
#include <fastgraf.h>
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
void main(void);
#ifdef FG32
char buffer[20000];
#else
char far buffer[20000];
#endif
void main()
{
int file_size;
int old_mode;
FILE *stream;
fg_initpm();
if (fg_testmode(19,1) == 0)
{
printf("This program requires a 320 ");
printf("x 200 MCGA graphics mode.\n");
exit(1);
}
stream = fopen("CORAL.PCX","rb");
file_size = (int)(filelength(fileno(stream)));
fread(buffer,1,file_size,stream);
fclose(stream);
old_mode = fg_getmode();
fg_setmode(19);
fg_imagebuf(buffer,file_size);
fg_showpcx("",4);
fg_waitkey();
fg_setmode(old_mode);
fg_reset();
}