Gered
62af8575c6
- 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 |
||
---|---|---|
TEST | ||
.gitignore | ||
DGL.C | ||
DGL.H | ||
DGLBLIT.C | ||
DGLBLIT.H | ||
DGLBLITA.ASM | ||
DGLCLIP.C | ||
DGLCLIP.H | ||
DGLCMN.H | ||
DGLDRAW.C | ||
DGLDRAW.H | ||
DGLDRAWA.ASM | ||
DGLEVENT.C | ||
DGLEVENT.H | ||
DGLFIXP.C | ||
DGLFIXP.H | ||
DGLGFX.C | ||
DGLGFX.H | ||
DGLKBRD.C | ||
DGLKBRD.H | ||
DGLKEYS.H | ||
DGLMATH.C | ||
DGLMATH.H | ||
DGLMOUSE.C | ||
DGLMOUSE.H | ||
DGLMTX33.H | ||
DGLPAL.C | ||
DGLPAL.H | ||
DGLPCX.C | ||
DGLPCX.H | ||
DGLRECT.H | ||
DGLUTIL.C | ||
DGLUTIL.H | ||
DGLVEC2.H | ||
MAKEFILE | ||
README.md |
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