Mail Archives: djgpp/1995/11/05/07:19:38
On Mon, 30 Oct 1995, Hartmut Schirmer wrote:
> psteele AT conch DOT aa DOT msen DOT com (Patrick Steele) wrote:
>
> >I'm trying to use BCC2GRX to compile, but BCC2GRX is based on the old
> >Borland C++ 3.1 BGI which could not use SVGA mode (at least not
> >640x480x256). GRX by itself works fine on my system in SVGA mode. I
> >just need to know how to get BCC2GRX to initialize to SVGA.
>
> With BCC2GRX you can use any available GRX mode. Just add one additional line
> to your code:
>
> gd = _YOUR_OLD_GD_SETUP_;
> gm = _THE_OLD_MODE_SELECTION_;
> #ifdef __GNUC__
> set_BGI_mode_whc(&gd, &gm, XRES, YRES, NC);
> #endif
> initgraph(&gd, &gm, "");
>
> and define the XRES, YRES and NC values.
The problem though is that my gd and gm parameters are not supported by
BCC2GRX (because BCC2GRX was written for Borland C++ 3.1). My app was
written with Borland C++ 4.5 and the Borland 32-bit PowerPak. The
PowerPack had a 32-bit version of the BGI which included a gd parameter
of 'TRIDENT256' and a gm of 'RES640x480'. This gave me a SVGA display on
my Trident card. When running on other machines, I could use a gd value
of 'VESA256' to autodetect the VESA card.
I'm either going to modify BCC2GRX to support the newer 32-bit BGI modes,
or just convert the graphics calls to native GRX calls. Either one
however will take longer than I would like.
+-----------------------------------------------------------+
| Patrick Steele psteele AT mail DOT msen DOT com |
| WWW http://www.msen.com/~psteele |
+-----------------------------------------------------------+
| Check out QUAKE HQ! at http://www.msen.com/~psteele/quake |
+-----------------------------------------------------------+
- Raw text -