EasyVGA-ForDOS is a simple library designed to facilitate VGA graphics programming in DOS environments. It provides a set of functions to initialize VGA modes, create and manipulate 2D vectors and points, convert RGB values to VGA color indices, and draw lines between points with specified colors.
- VGA Mode Initialization: EasyVGA-ForDOS allows you to initialize VGA modes directly from your DOS applications.
- 2D Vector and Point Manipulation: Create and manipulate 2D vectors and points with ease.
- Color Conversion: Convert RGB values to VGA color indices for drawing.
- Line Drawing: Draw lines between points with specified colors.
To initialize the VGA mode, call the EasyVGA_Init
function. This sets the VGA mode to 320x200 with 256 colors.
EasyVGA_Init();
Create a point with a 2D vector.
Vector2 pos = EasyVGA_Vector2(100.0f, 100.0f);
Draw a line between two points with a specified color using the EasyVGA_CreateLine
function.
Vector2 point1 = EasyVGA_Vector2(50.0f, 50.0f);
Vector2 point2 = EasyVGA_Vector2(200.0f, 200.0f);
EasyVGA_Color color = EasyVGA_RGBColor(255, 0, 0); // Red color
EasyVGA_Line line = EasyVGA_CreateLine(line);
To compile this code for DOS, you can use a DOS compiler like Turbo C or Borland C++. Here's a basic example of how you might compile the code using Turbo C:
- Open Turbo C.
- Load the
EasyVGA.c
file. - Compile the code by selecting the appropriate options for your DOS environment.
- If successful, you will get an executable file that you can run in DOS.
Contributions are welcome! If you have any feedback or suggestions for improvements, please feel free to contact the maintainer at [email protected].
EasyVGA-ForDOS is open-source software licensed under the MIT License. See the LICENSE
file for more details.