Mail Archives: djgpp/1993/10/22/15:30:23
Help please. I can only get 320 x 200 graphics and 8 colors.
running a 486 50 with a direct vido bus using Tseng chips.
The program, autoexec and config.sys follow.
compile with gcc a.c -v -g -lpc -lgr -lm
and use go32t a.out to run the program.
Thanks
Gordon
#include <graphics.h>
#include <stdlib.h>
#include <pc.h>
int X;
int Y;
void setup()
{
int i;
int t_r, t_g, t_b;
int o_r=0, o_g=0, o_b=0;
int j=0;
for (i=2; i<256; i++)
GrSetColor(i, (i&1)*255, (i&2)*127, (i&4)*63);
}
main()
{
int x,y;
srandom(time(0));
GrSetMode(GR_biggest_graphics);
setup();
X = GrMaxX();
Y = GrMaxY();
GrLine(1,1,50,50,GrWhite());
getch();
printf("%d %d\n",X,Y);
getch();
for(x=0; x<X; x++)
for(y=0; y<Y; y++)
GrPlot(x,y,x*y%256);
getkey();
GrSetMode(GR_default_text);
}
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\emm386.exe
device = c:\dos\ansi.sys
FILES=20
buffers = 20
STACKS=9,256
rem DEVICE= eansi.sys
SHELL =C:\COMMAND.COM C:\ /E:600 /P
C:\DOS\SMARTDRV.EXE
PROMPT $p$g
set COMPILER_PATH=c:/djgpp/bin
set C_INCLUDE_PATH=c:/djgpp/include
set CPLUS_INCLUDE_PATH=c:/djgpp/cplusinc;c:/djgpp/include
set OBJC_INCLUDE_PATH=c:/djgpp/include
set OBJCPLUS_INCLUDE_PATH=c:/djgpp/include
set LIBRARY_PATH=c:/djgpp/lib
set TMPDIR=c:/tmp
set GO32TMP=c:/tmp
set GO32 = ansi driver c:/djgpp/drivers/tseng4k.grd gw 1024 gh 768
rem set BISON_SIMPLE=c:/djgpp/lib/bison.simple
rem set BISON_HAIRY=c:/djgpp/lib/bison.hairy
renm set FLEX_SKELETON=c:/djgpp/lib/flex.skeleton
PATH = C:\djgpp\BIN;c:\borlandc\bin;C:\;C:\DOS;
C:
CD \djgpp\SOURCE
SET TEMP=C:\DOS
mouse
- Raw text -