A "retro" C game development library, developed with Watcom C targeting MS-DOS and VGA Mode 13h.
Go to file
Gered 62af8575c6 various updates i've left uncommitted for many months
- rename standard integer types to a more familiar (u)int(8/16/32)
- many function/struct renames. i don't _really_ know if what i've done
  for this is better, but it "feels" better to me. many draw/blit
  function names are shorter which is nice, at least. kinda important
  to me because i develop this on a real DOS machine in 80x50 text mode.
- add 'extern "C"' blocks to headers for C++ compiler usage
- draw/pixel color value arguments for functions should all have been
  changed to be uint8 instead of a full 32-bit int. feels right, but
  maybe should've left alone...
- small fix to keyboard handler. noticed a problem on one thinkpad
  laptop. was a result of what i think was a typo in a constant value
  used during the part of the interrupt handler that tells the keyboard
  controller the key event was processed
- fix uncommon potential crash function return in draw_filled_rect
- renamed low-level "direct" assembly functions to "lowlevel_xxx" to
  be a little bit more explicit about what they are
- add some convenience event helper functions for determining event
  types
- add fixed point atan2
- fixed some tabs/spaces inconsistences (should all be spaces now?)
- maybe some other minor things i've forgotten
2020-07-19 19:24:48 -04:00
TEST various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
.gitignore various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGL.C various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGL.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLBLIT.C various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLBLIT.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLBLITA.ASM various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLCLIP.C various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLCLIP.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLCMN.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLDRAW.C various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLDRAW.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLDRAWA.ASM various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLEVENT.C various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLEVENT.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLFIXP.C various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLFIXP.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLGFX.C various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLGFX.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLKBRD.C various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLKBRD.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLKEYS.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLMATH.C various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLMATH.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLMOUSE.C various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLMOUSE.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLMTX33.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLPAL.C various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLPAL.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLPCX.C various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLPCX.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLRECT.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLUTIL.C various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLUTIL.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
DGLVEC2.H various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
MAKEFILE various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00
README.md various updates i've left uncommitted for many months 2020-07-19 19:24:48 -04:00

libDGL

libDGL is a "retro coding" C library aimed at MS-DOS VGA Mode 13h game development. It targets 486 DX2 systems as a baseline for performance.

The project is developed with Watcom C 10.0b and Borland Turbo Assembler 4.0.

Why?

Because it's fun.

If you were looking for something for "retro" MS-DOS game development that is fully featured, really performant and bug-tested that's ready right now, have a look at Allegro 3.x or possibly 4.x depending on what hardware you're targetting.

Status

This library is currently under early development and is lacking many things and probably chock-full of bugs.

Done / Mostly Done

  • Primitive drawing support
  • Text rendering
  • Blitting
  • Graphics clipping
  • Keyboard input
  • Mouse input
  • Input device (keyboard/mouse) events
  • PCX loading/saving
  • Math library (general helpers, 2D vector, 3x3 matrix)
  • Fixed point math
  • Basic error handling / results

TODO

  • Scaled/rotated blitting support
  • Blending
  • "Mode 7" like support
  • Custom font loading (BIOS-like format?)
  • Joystick / Gravis GamePad support
  • PC speaker sounds
  • Sound Blaster compatible sound/music
  • Gravis Ultrasound compatible sound/music
  • Sine/cosine lookup table optimizations
  • BMP, LBM, GIF image loading (and saving?)
  • Simple immediate mode GUI

Building

You can use WMAKE to build using the included MAKEFILE.

To build the library:

> wmake target_config=debug build           ; debug build

> wmake target_config=release build         ; release build

Will output DGL.LIB in the project directory.

To build and run the (incomplete) test suite, look under the "TEST" directory. There you will find a separate MAKEFILE which assumes that you are running wmake from that directory and that DGL.LIB has already been built.

> cd test
test> wmake run                                 ; run test suite
test> wmake debug                               ; run through WD debugger