home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ Games Programming
/
CPPGAMES.ISO
/
thx
/
source
/
utils
/
showpcx.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1995-05-12
|
711b
|
33 lines
#include <fastgraf.h>
#include <iostream.h>
#include <io.h>
const int VMODE = 22;
int main(int argc,char** argv)
{
if (argc<2)
{
cout << "\nUSAGE : SHOWPCX <pcxfile>\n";
cout << " SHOWPCX simply displays the supplied pcx file.\n";
cout << " The image is displayed in the upper left corner of the";
cout << " screen, and its internal palette is used.\n";
return -1;
}
if (access(argv[1],0)!=0)
{
cout << "can't find file '" << argv[1] << "'\n";
return -1;
}
int oldmode=fg_getmode();
fg_waitfor(18);
fg_setmode(VMODE);
fg_move(0,0);
fg_showpcx(argv[1],2);
fg_waitkey();
fg_setmode(oldmode);
return 0;
}