Skip to content

DismissD64/EasyVGA-ForDOS-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

EasyVGA-ForDOS

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.

Features

  • 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.

Usage

Initialization

To initialize the VGA mode, call the EasyVGA_Init function. This sets the VGA mode to 320x200 with 256 colors.

EasyVGA_Init();

Creating Points

Create a point with a 2D vector.

Vector2 pos = EasyVGA_Vector2(100.0f, 100.0f);

Drawing Lines

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);

Compilation

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:

  1. Open Turbo C.
  2. Load the EasyVGA.c file.
  3. Compile the code by selecting the appropriate options for your DOS environment.
  4. If successful, you will get an executable file that you can run in DOS.

Contributing

Contributions are welcome! If you have any feedback or suggestions for improvements, please feel free to contact the maintainer at [email protected].

License

EasyVGA-ForDOS is open-source software licensed under the MIT License. See the LICENSE file for more details.

"