home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ Games Programming
/
CPPGAMES.ISO
/
fgl
/
fglight
/
exc.arj
/
TEMP
/
11-09.C
< prev
next >
Wrap
Text File
|
1995-01-20
|
956b
|
51 lines
#include <fastgraf.h>
#include <stdio.h>
#include <stdlib.h>
void main(void);
#ifdef FG32
char buffer[16000];
#else
char far buffer[16000];
#endif
void main()
{
int handle;
int new_mode, old_mode;
fg_initpm();
new_mode = fg_bestmode(320,200,1);
if (new_mode < 0 || new_mode == 12)
{
printf("This program requires a 320 ");
printf("x 200 color graphics mode.\n");
exit(1);
}
old_mode = fg_getmode();
fg_setmode(new_mode);
fg_vbinit();
handle = fg_vbdefine(buffer,160,100);
fg_vbopen(handle);
fg_setcolor(7);
fg_fillpage();
fg_setcolor(9);
fg_locate(6,6);
fg_text("quadrant",8);
fg_vbpaste(0,159,0,99,0,99);
fg_waitkey();
fg_tcdefine(9,1);
fg_vbtcxfer(0,159,0,99,160,99);
fg_vbtcxfer(0,159,0,99,0,199);
fg_vbtcxfer(0,159,0,99,160,199);
fg_waitkey();
fg_vbclose();
fg_setmode(old_mode);
fg_reset();
}