bob
--
The doctor is out!
There is a function RegisterBGIFont(), or something like that, which can be
used to more-or-less install the BGI into your code. Then you won't need to
keep the BGI in the same directory as your app. But you will still need the
BGI for compiling (or linking, more likely).
We always just left the BGI's in the directory and then kicked ourselves when
we only did a "xcopy *.exe b:" to move to another machine. :)
Chris
>There is a function RegisterBGIFont(), or something like that, which can be
>used to more-or-less install the BGI into your code. Then you won't need to
This comes from memory, as the code is not on this computer and the
network is not up at the moment...
#makefile
program: program.h program.obj egavga.obj sans.obj
tcc -O2 -Z -G program.obj egavga.obj sans.obj graphics.lib
egavga.obj: $(BGIDIR)\egavga.bgi
bgiobj /f $(BGIDIR)\egavga egavga.obj
sans.obj: $(FONTDIR)\sans.chr
bgiobj /f $(FONTDIR)\sans sans.obj
/* program.c
*/
int main (void)
{
int grDriver = DETECT, grMode = VGAHI;
registerfarbgidriver (egavga_fdriver);
initgraph (EGAVGA, "");
registerfarbgifont (sansserif_font_far);
:
}
The /f in the bgiobj line tells it to convert it to a far module; thus
we need to use ...farbgi... calls. If you have small enough code, you
can omit the /f and use the registerbgi... calls (it's a bit faster.)
I don't think that this is possible to do from the IDE (I'm not too
impressed with the project stuff in it.) Anyways, the above should
compile and link the graphics driver (bgi file) and the font to be a
part of the resulting .exe file.
I wrote a handy library to do this driver registering and initialization
stuff (just do a openvga(VGAHI) or opensvga256(SVGA640x400x256) or
whatever); if anyone is interested in the source code, just drop me a
e-mail.
--
Juha Liukkonen, aka jliu...@cc.helsinki.fi
University of Helsinki, Dept. of Lost Souls
"Trust me, I know what I'm doing." - Sledge Hammer