Make TC graphics procedures from * .bgi and run independently

xiaoxiao2021-03-06  14

Enter the DOS mode, enter the directory where TC is located

1. Convert graphics driver Egavga.GBI (most common, resolution 640 * 480) to Egavga.obj

Type: BGiobj Egavga

(If it is TC , it should be performed in the BGI directory)

2, connect Egavga.obj to Graphics.lib

Type: TLIB LIB / Graphics.lib Egavga.obj

(In TC , Tlib ../lib/graphics.lib ../bgi/egavgga.obj should be performed in a bin directory.

3, in the program, press the graphics library

INT GDRIVER = VGA, GMODE = VGAHI;

INITGRAPH (& gDriver, & gmode, "); // No path where the driver is required

RegisterBgidriver; Egavga_Driver;

At this point, I'm big!

Of course, the drivers of other display modes (such as CGA.BGI), vector fonts can be connected to the graphics library.

#include

#include

int main ()

{

INT GDRIVER = Detect, GMODE;

RegisterBgidriver: / * Create a separate graphic running program * /

INITGRAPH (GDRIVER, GMODE, "C: // TC");

BAR3D (50, 50, 250, 150, 20, 1);

Getch ();

Closegraph ();

Return 0;

}

转载请注明原文地址:https://www.9cbs.com/read-50301.html

New Post(0)