Cyningstan DOS Games

Games for Early PCs

A CGALIB Update: Some New Utilities

The CGALIB bitmap editor.
The CGALIB bitmap editor.

Tuesday, 26th September 2023

There are some new additions to the CGALIB graphics library. The two major changes are a new bitmap editor and a new font editor, to replace the rudimentary bitmap and font makers originally supplied.

The Bitmap Editor, called makebit.exe like its predecessor, is now a capable utility for editing tiles and sprites. It supports up to 24 bitmaps in a single file, each ranging in size from 4x2 pixels to 24x24. Bitmaps can be copied and pasted, flipped and rotated. This editor should make it easier to create the graphics for simple game projects.

The Font Editor, called makefont.exe, is also a capable editor that works in a similar way to the Bitmap Editor. Fonts of up to 256 characters are supported, at 4x8 pixel size (a limitation of the CGALIB library). While three versatile fonts are supplied with CGALIB, this utility will make it easier to create bespoke fonts for your project.

A more subtle change is that previously hidden attributes of bitmaps and fonts are now made accessible to programs that use CGALIB. Some attributes were hidden to prevent accidental change causing glitches and crashes. This was fine for most projects, but the bitmap and font editors required access to, for example, bitmap width and height, since these would not be known at run time. So the include files have been changed to expose these values to the rest of the project.

The source and binaries for CGALIB are available from the CGALIB Graphics Library page. The sources are also available as a git repository from its github page.


New Comment

Yes No